refine the Travis CI setup

This commit is contained in:
edef 2015-04-16 11:27:57 -04:00
parent 0bebfae21d
commit 7fd71aeb05
3 changed files with 18 additions and 6 deletions

View File

@ -1,12 +1,9 @@
language: rust language: rust
install: install:
- sudo pip install ghp-import - .travis/docs/install
script: script:
- cargo test - cargo test
- cargo bench - cargo bench
- cargo doc --no-deps - cargo doc --no-deps
after_success: | after_success:
echo '<meta http-equiv="refresh" content="0;url=fringe/">' > target/doc/index.html &&\ - .travis/docs/after_success
ghp-import -n target/doc &&\
git remote set-url origin https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git &&\
git push -f origin gh-pages

9
.travis/docs/after_success Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -e
if [ "$TRAVIS_PULL_REQUEST" = false ] && [ "$TRAVIS_BRANCH" = master ]; then
echo '<meta http-equiv="refresh" content="0;url=fringe/">' > target/doc/index.html
ghp-import -n target/doc
git remote set-url origin "https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}"
git push -f origin gh-pages
fi

6
.travis/docs/install Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
set -e
if [ "$TRAVIS_PULL_REQUEST" = false ] && [ "$TRAVIS_BRANCH" = master ]; then
sudo pip install ghp-import
fi