Skip to content

Commit

Permalink
Setup auto deploy to pagefront on CI success (#154)
Browse files Browse the repository at this point in the history
Closes #89. Also removes the build matrix from travis since the only way to deploy would to deploy after each individual job succeeds. That would result in 5 deploys at the exact same time each build.
  • Loading branch information
Robdel12 authored Sep 18, 2016
1 parent da7f304 commit 7e1cc88
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
/libpeerconnection.log
npm-debug.log
testem.log

.env.deploy.*
22 changes: 4 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,23 @@
---
language: node_js
node_js:
- "4"

- '4'
sudo: false

cache:
directories:
- node_modules

env:
- EMBER_TRY_SCENARIO=default
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary

matrix:
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary

before_install:
- npm config set spin false
- npm install -g bower
- bower --version
- npm install phantomjs-prebuilt
- phantomjs --version

install:
- npm install
- bower install

after_success:
test $TRAVIS_BRANCH = "master" && ember deploy production
script:
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup
- ember try:each --skip-cleanup
8 changes: 8 additions & 0 deletions config/deploy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = function(deployTarget) {
return {
pagefront: {
app: 'emberx-select',
key: process.env.PAGEFRONT_KEY
}
};
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"ember-cli": "2.7.0",
"ember-cli-app-version": "^1.0.0",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-deploy": "0.5.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.4.0",
"ember-cli-jshint": "^1.0.0",
Expand All @@ -34,6 +35,7 @@
"ember-disable-prototype-extensions": "^1.1.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-pagefront": "0.11.2",
"ember-resolver": "^2.0.3",
"ember-sinon": "0.5.1",
"loader.js": "^4.0.1"
Expand Down
3 changes: 1 addition & 2 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function(environment) {
var ENV = {
modulePrefix: 'dummy',
environment: environment,
locationType: 'hash',
locationType: 'auto',
rootURL: '/',
EmberENV: {
FEATURES: {
Expand Down Expand Up @@ -40,7 +40,6 @@ module.exports = function(environment) {
}

if (environment === 'production') {
ENV.rootURL = '/emberx-select';
}

return ENV;
Expand Down

0 comments on commit 7e1cc88

Please sign in to comment.