Skip to content

Instantly share code, notes, and snippets.

@pckilgore
Last active September 11, 2018 18:04
Show Gist options
  • Save pckilgore/8c96e86f3ca041d59ced67a2d320f54c to your computer and use it in GitHub Desktop.
Save pckilgore/8c96e86f3ca041d59ced67a2d320f54c to your computer and use it in GitHub Desktop.
Auto deploy and alias your node_js app to production domain with travis-ci.com and now.sh, but only build/test master and PRs.
language: node_js
node_js:
- node
dist: trusty
branches:
only:
- master
cache:
directories:
- $HOME/.npm
script: npm test
before_deploy: npm install now --no-save
deploy:
- provider: script
script: now --token $NOW_TOKEN --public && now alias --token $NOW_TOKEN
skip_cleanup: true
on:
master: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment