Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. image: alpine:latest
  2.  
  3. before_script:
  4. - apk update -q
  5. - apk add -q openssh-client rsync
  6. - mkdir -p ~/.ssh
  7. - echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
  8. - chmod 600 ~/.ssh/id_rsa
  9. - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
  10.  
  11. deploy:
  12. stage: deploy
  13. environment:
  14. name: production
  15. script:
  16. - rsync -avz --delete --exclude=.env* --exclude=vendor --exclude=.git* --exclude=storage ./ ubuntu@ec2:/var/www/html/
  17. only:
  18. - master
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement