travis_after_success.sh 614 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. # Copyright (c) Jupyter Development Team.
  3. # Distributed under the terms of the Modified BSD License.
  4. if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_BRANCH == "master" ]]
  5. then
  6. echo "-- pushing docs --"
  7. ( cd docs
  8. git init
  9. git config user.email "travis@travis-ci.com"
  10. git config user.name "Travis Bot"
  11. touch .nojekyll # disable jekyll
  12. git add .
  13. git commit -m "Deploy to GitHub Pages"
  14. git push --force --quiet "https://${GHTOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1
  15. ) && echo "-- pushed docs --"
  16. else
  17. echo "-- will only push docs from master --"
  18. fi