Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- image: alpine:latest
- before_script:
- - 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'
- deploy:
- stage: deploy
- environment:
- name: production
- script:
- - rsync -avz --delete --exclude=.env* --exclude=vendor --exclude=.git* --exclude=storage ./ ubuntu@ec2:/var/www/html/
- only:
- - master
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement