Description
We need to deploy our Emberjs application when:
- code is pushed/merged into deployment branch.
- all acceptance tests succeed.
End Goal
before_deploy:
- ember test -f 'Acceptance |'
deploy:
skip_cleanup: true
provider: script
script: ember deploy testing --verbose
on:
branch: deployment
Step by step
- Setup deployment trigger
deploy:
on:
branch: deployment
- Run the acceptance tests
before_deploy:
- ember test -s -f 'Acceptance |'
- Add the deployment command
deploy:
provider: script
script: ember deploy testing --verbose
- Complete travis config file
---
language: node_js
node_js:
- "4.5.0"
sudo: false
cache:
directories:
- node_modules
before_install:
- export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
- "npm config set spin false"
- "npm install -g npm@^2"
install:
- npm install -g bower
- npm install
- bower install
script:
- npm test
before_deploy:
- ember test -s -f 'Acceptance |'
deploy:
skip_cleanup: true
provider: script
script: ember deploy testing --verbose
on:
branch: deployment
Now you can do this!