Last active
March 19, 2017 00:19
-
-
Save augusteo/2735389476794ab092ad1b365de8d572 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: centos:latest | |
before_script: | |
- yum install -y which | |
- 'which ssh-agent || ( yum install -y openssh openssh-server openssh-clients openssl-libs )' | |
- 'which rsync || ( yum install -y rsync )' | |
- eval $(ssh-agent -s) | |
- ssh-add <(echo "$SSH_PRIVATE_KEY") | |
- mkdir -p ~/.ssh | |
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config | |
staging-deployment: | |
stage: deploy | |
script: | |
- rsync -hrvz files/* root@yourhost.com:/var/www/html/ | |
only: | |
- dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment