Skip to content

Instantly share code, notes, and snippets.

@AzMoo
Last active July 1, 2016 01:12
Show Gist options
  • Save AzMoo/c0dff90de853985370d857659fd1a162 to your computer and use it in GitHub Desktop.
Save AzMoo/c0dff90de853985370d857659fd1a162 to your computer and use it in GitHub Desktop.
image: alpine
before_script:
- apk add openssh --update
deploy:
stage: deploy
script:
- mkdir -p ~/.ssh
- echo -e $SSH_KNOWN_HOSTS > ~/.ssh/known_hosts
- echo -e $SSH_PUBLIC_KEY > ~/.ssh/id_rsa.pub
- echo -e $SSH_PRIVATE_KEY > ~/.ssh/id_rsa
- chmod 700 ~/.ssh && chmod 600 ~/.ssh/*
- scp * mysite@myserver:/srv/www/mysite/website/
only:
- tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment