travis_after_success.sh 779 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. # submit coverage to coveralls
  3. cat ./test/coverage/Firefox*/lcov.info | ./node_modules/coveralls/bin/coveralls.js
  4. # push docs on master branch
  5. if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_BRANCH == "master" ]]
  6. then
  7. echo "-- will push docs --"
  8. git config --global user.email "travis@travis-ci.com"
  9. git config --global user.name "Travis Bot"
  10. git clone https://${GHREPO}.git travis_docs_build
  11. cd travis_docs_build
  12. git checkout gh-pages
  13. echo "https://${GHTOKEN}:@github.com" > .git/credentials
  14. git config credential.helper "store --file=.git/credentials"
  15. rm -rf ./*
  16. cp -r ../docs/* ./.
  17. git add -A
  18. git commit -m "autocommit docs"
  19. git push origin gh-pages
  20. else
  21. echo "-- will only push docs from master --"
  22. fi