mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-29 06:54:33 +01:00
publish docs on gh pages
This commit is contained in:
parent
2ec5d59ee9
commit
2b6b513b89
2 changed files with 23 additions and 0 deletions
|
@ -26,6 +26,9 @@ install:
|
|||
script:
|
||||
- bash ci/script.sh
|
||||
|
||||
after_success:
|
||||
- bash ci/after-success.sh
|
||||
|
||||
after_script: set +e
|
||||
|
||||
branches:
|
||||
|
|
20
ci/after-success.sh
Normal file
20
ci/after-success.sh
Normal 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
|
Loading…
Reference in a new issue