Skip to content

Instantly share code, notes, and snippets.

@augusteo
Last active March 19, 2017 00:19
Show Gist options
  • Save augusteo/2735389476794ab092ad1b365de8d572 to your computer and use it in GitHub Desktop.
Save augusteo/2735389476794ab092ad1b365de8d572 to your computer and use it in GitHub Desktop.
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