Skip to content

Instantly share code, notes, and snippets.

@seb-thomas
Last active May 4, 2018 11:43
Show Gist options
  • Save seb-thomas/b7c0e975f2ac35364c3b9a16b687692e to your computer and use it in GitHub Desktop.
Save seb-thomas/b7c0e975f2ac35364c3b9a16b687692e to your computer and use it in GitHub Desktop.
Travis script with deploy
language: node_js
node_js:
- stable
addons:
ssh_known_hosts: xxx.webfaction.com
env:
global:
secure: xxx-DEPLOY_USER-as-encrypted-string-xxx
after_success:
- npm run coverage
before_deploy:
- openssl aes-256-cbc -K $encrypted_72860efd75cd_key -iv $encrypted_72860efd75cd_iv -in deploy_rsa.enc -out /tmp/deploy_rsa -d
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa
deploy:
provider: script
skip_cleanup: true
script: rsync -qazr --delete-after -e 'ssh' ./config ./models [email protected]:/home/$DEPLOY_USER/path
on:
branch: master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment