diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4aff1d4..cce9191 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,21 @@ build site: paths: - dist +deploy dev: + image: instrumentisto/rsync-ssh + stage: deploy + only: + refs: + - develop + script: + - mkdir ~/.ssh + - echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + - eval $(ssh-agent -s) + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - + - rsync -vr -e "ssh -p ${SSH_PORT}" dist/ "${DEPLOY_DEST}/dev/" + + deploy site: image: instrumentisto/rsync-ssh stage: deploy