diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1c9a2c5..2176745 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,3 +18,21 @@ build-resume: - resume_for_recruiters.pdf - ResumeSite.tar.gz +deploy-resume: + image: sothr.com/deploy:stretch + stage: deploy + variables: + TARGET_DIRECTORY: "/srv/www/sothr.com/resume" + script: + - eval `ssh-agent -s` + - ssh-add <(echo "$SSH_DEPLOY_KEY") + - mkdir /tmp/deploy + - tar -xvf ResumeSite.tar.gz /tmp/deploy + - cp resume.pdf /tmp/deploy + - cp resume_for_recruiters.pdf /tmp/deploy + - rsync -avz --delete-delay -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress /tmp/deploy/* $DEPLOY_USER@$DEPLOY_HOST:$TARGET_DIRECTORY + only: + - master + tags: + - docker + environment: production \ No newline at end of file