From 2b6b513b8978ac63fd12ee7049c85fce1194a487 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 27 Aug 2018 14:44:47 +0200 Subject: publish docs on gh pages --- ci/after-success.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ci/after-success.sh (limited to 'ci') diff --git a/ci/after-success.sh b/ci/after-success.sh new file mode 100644 index 0000000..4377267 --- /dev/null +++ b/ci/after-success.sh @@ -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 -- cgit v1.2.3