a guest May 22nd, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- image: alpine:latest
- - apk update -q
- - apk add -q openssh-client rsync
- - mkdir -p ~/.ssh
- - echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
- - chmod 600 ~/.ssh/id_rsa
- - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- stage: deploy
- name: production
- - rsync -avz --delete --exclude=.env* --exclude=vendor --exclude=.git* --exclude=storage ./ ubuntu@ec2:/var/www/html/
- - master
RAW Paste Data