ci_after_success.sh 697 B

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