Add travis auto deploy for Github Pages

This commit is contained in:
Chuck Horton
2015-11-20 11:21:56 -08:00
committed by Sam Saccone
parent d0e743044b
commit cb31ef92e5
2 changed files with 16 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ before_script:
- 'export DISPLAY=:99.0'
- sh -e /etc/init.d/xvfb start
- sleep 3
- npm i -g bower
- npm i -g bower gulp
- bower i
script:
- npm run lint

15
travis-runner.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
set -o pipefail
if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" != "true" ]
then
echo "Deploying!" && \
sed -i .tmp "s/\/\/ app.baseUrl = '\/polymer-starter-kit/app.baseUrl = '\/polymer-starter-kit/" app/scripts/app.js && \
rm app/scripts/app.js.tmp && \
bower i && \
gulp build-deploy-gh-page && \
sed -i .tmp "s/app.baseUrl = '\/polymer-starter-kit/\/\/ app.baseUrl = '\/polymer-starter-kit/" app/scripts/app.js && \
rm app/scripts/app.js.tmp
else
npm run lint
fi