Browse Source

Attempting to get autodeploy working

environments/production/deployments/9
Drew Short 6 years ago
parent
commit
2fd803e0ea
  1. 18
      .gitlab-ci.yml

18
.gitlab-ci.yml

@ -18,3 +18,21 @@ build-resume:
- resume_for_recruiters.pdf - resume_for_recruiters.pdf
- ResumeSite.tar.gz - 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
Loading…
Cancel
Save