trying new Travis feature to build the docs only once, in a separate
build stage:
language: rust
sudo: required
-after_success: |
- [ $TRAVIS_BRANCH = master ] &&
- [ $TRAVIS_PULL_REQUEST = false ] &&
- cargo doc &&
- echo "<meta http-equiv=refresh content=0;url=neon/index.html>" > 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
dist: trusty
+
rust:
- stable
- beta
@@ -27,6 +20,19 @@ before_install:
- nvm install ${TRAVIS_NODE_VERSION}
- nvm use ${TRAVIS_NODE_VERSION}
+jobs:
+ include:
+ - stage: docs
+ rust: stable
+ script: |
+ [ $TRAVIS_BRANCH = master ] &&
+ [ $TRAVIS_PULL_REQUEST = false ] &&
+ cargo doc &&
+ echo "<meta http-equiv=refresh content=0;url=neon/index.html>" > 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
+
addons:
apt:
sources:
