# You must sign into travis-ci.org and set the commit hook on your project for travis to # run on your project. The secure: variable must be generated by running `travis encrypt` # on a github oauth key that you can generate using curl. language: node_js node_js: - 5.3.0 notifications: irc: "irc.freenode.org#generator-travis-ci" branches: only: - dev env: global: # GH_OAUTH_TOKEN is the oauth token generated as described at # https://help.github.com/articles/creating-an-oauth-token-for-command-line-use # # curl -u 'username' -d '{"scopes":["repo"],"note":"push to gh-pages from travis"}' https://api.github.com/authorizations # # It must be encrypted using the travis gem # http://about.travis-ci.org/docs/user/build-configuration/#Secure-environment-variables # # travis encrypt GH_OAUTH_TOKEN=XXXXXXXXXXXXXXX # # User specific env variables - secure: "geXbRlvaUvFwPzGXwzPHjFHEIRDW3tgDu0aBc1KvfXC0rb+RCKbHMnAZMo26Y6wAJ9SQk2P1siW/vMoP1h7pSQieGMBkX+c0IXSloxpTHOtqBBK8jCISeXs/HajFz/ITwaV8evnwRtz6bCZg0qo+P1pBgOa90oklUOJAeqC8uTw=" - GH_OWNER: atomantic - GH_PROJECT_NAME: undermore # This .travis.yml file instructs travis-ci.org to build your master branch using `yeoman build` # and deploy the output to your project's gh-pages branch. after_success: # merge good build into master (this is our new *.*.x) # first, get the read-write copy of the source #- git submodule add https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} master > /dev/null 2>&1 #- cd master #- git merge origin/dev # Any command that using GH_OAUTH_TOKEN must pipe the output to /dev/null to not expose your oauth token #- git push origin master > /dev/null 2>&1 #- cd .. # GH-PAGES as deployment target # merge dist files into gh-pages to publish to production - git submodule add -b gh-pages https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} site > /dev/null 2>&1 - cd site - if git checkout gh-pages; then git checkout -b gh-pages; fi - git rm -r . - cp -R ../dist/* . - cp ../dist/.* . - rm libs - rm src - cp -R ../test . - cp -R ../libs . - cp -R ../src . - cp -R ../bin . - git add -f . - git config user.email "atomantic@gmail.com" - git config user.name "Adam Eivy" - git commit -am "adding the yeoman build files to gh-pages [ci skip]" # Any command that using GH_OAUTH_TOKEN must pipe the output to /dev/null to not expose your oauth token - git push https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} HEAD:gh-pages > /dev/null 2>&1