From 7fd71aeb05bf7a7c4942f693c59cb3b675c670e0 Mon Sep 17 00:00:00 2001 From: edef Date: Thu, 16 Apr 2015 11:27:57 -0400 Subject: [PATCH] refine the Travis CI setup --- .travis.yml | 9 +++------ .travis/docs/after_success | 9 +++++++++ .travis/docs/install | 6 ++++++ 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100755 .travis/docs/after_success create mode 100755 .travis/docs/install diff --git a/.travis.yml b/.travis.yml index 672f7cb..aa4295e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,9 @@ language: rust install: - - sudo pip install ghp-import + - .travis/docs/install script: - cargo test - cargo bench - cargo doc --no-deps -after_success: | - echo '' > target/doc/index.html &&\ - ghp-import -n target/doc &&\ - git remote set-url origin https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git &&\ - git push -f origin gh-pages +after_success: + - .travis/docs/after_success diff --git a/.travis/docs/after_success b/.travis/docs/after_success new file mode 100755 index 0000000..1da3c26 --- /dev/null +++ b/.travis/docs/after_success @@ -0,0 +1,9 @@ +#!/bin/bash +set -e + +if [ "$TRAVIS_PULL_REQUEST" = false ] && [ "$TRAVIS_BRANCH" = master ]; then + echo '' > 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 diff --git a/.travis/docs/install b/.travis/docs/install new file mode 100755 index 0000000..eb9d476 --- /dev/null +++ b/.travis/docs/install @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +if [ "$TRAVIS_PULL_REQUEST" = false ] && [ "$TRAVIS_BRANCH" = master ]; then + sudo pip install ghp-import +fi