Update .travis.yml for cargo doc

This commit is contained in:
Sergey Pepyakin 2018-01-22 18:55:47 +03:00
parent c98695f5dd
commit f1d93302f4
1 changed files with 8 additions and 0 deletions

View File

@ -17,3 +17,11 @@ script:
- cargo build --verbose
- cargo test --verbose
- cargo test --manifest-path=spec/Cargo.toml
after_success: |
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
cargo doc &&
echo "<meta http-equiv=refresh content=0;url=`echo $TRAVIS_REPO_SLUG | cut -d '/' -f 2`/index.html>" > target/doc/index.html &&
sudo pip install ghp-import &&
ghp-import -n target/doc &&
git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages