echo "DOC=$DOC" if [[ $TRAVIS_BRANCH != 'master' ]] echo "skipping doc export because branch is not master" exit; fi if [ "$DOC" != "true" ]; then echo "skipping doc export because not enabled for this build" exit; fi echo "exporting docs" export PATH=$HOME/.local/bin:$PATH cargo doc echo "" > target/doc/index.html pip install ghp-import --user `whoami` ghp-import -n target/doc git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages