publish docs on GH pages

This commit is contained in:
Jorge Aparicio
2018-08-27 17:44:55 +02:00
parent a79ea9bee7
commit 3e39a0b927
5 changed files with 35 additions and 3 deletions

20
ci/after-success.sh Normal file
View File

@@ -0,0 +1,20 @@
set -euxo pipefail
main() {
cargo doc
mkdir ghp-import
curl -Ls https://github.com/davisp/ghp-import/archive/master.tar.gz |
tar --strip-components 1 -C ghp-import -xz
./ghp-import/ghp_import.py target/doc
set +x
git push -fq https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git gh-pages && echo OK
}
# only publish on successful merges to master
if [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ] && [ $TARGET = x86_64-unknown-linux-gnu ]; then
main
fi