travis_after_success.sh 473 B

1234567891011121314151617
  1. #!/bin/bash
  2. if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_BRANCH == "master" ]]
  3. then
  4. echo "-- pushing docs --"
  5. ( cd docs
  6. git init
  7. git config user.email "travis@travis-ci.com"
  8. git config user.name "Travis Bot"
  9. git add .
  10. git commit -m "Deploy to GitHub Pages"
  11. git push --force --quiet "https://${GHTOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1
  12. ) && echo "-- pushed docs --"
  13. else
  14. echo "-- will only push docs from master --"
  15. fi