From f1d93302f49c5d5e44ad4bbc6fc3bac41acbccd2 Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Mon, 22 Jan 2018 18:55:47 +0300 Subject: [PATCH] Update .travis.yml for cargo doc --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2afd1c2..94ae2c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 "" > 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 \ No newline at end of file