From d9d8a8184e2089712eb0fcc9cec1bd3e20f6a8c1 Mon Sep 17 00:00:00 2001 From: Magnus Hallin Date: Sun, 11 Sep 2016 20:44:47 +0200 Subject: [PATCH] Fix documentation script --- .travis.yml | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3ff90630..d17ee3cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,28 +15,27 @@ script: - cargo test --verbose --features iron-handlers after_success: | - set -e - [ $TRAVIS_BRANCH = master ] - [ $TRAVIS_PULL_REQUEST = false ] - [ $TRAVIS_RUST_VERSION = stable ] + if [ "$TRAVIS_BRANCH" = master -a "$TRAVIS_PULL_REQUEST" = false -a "$TRAVIS_RUST_VERSION" = stable ]; then + set -e - cargo doc --features iron-handlers + cargo doc --features iron-handlers - mkdir -p ~/.ssh - openssl aes-256-cbc -K $encrypted_7258158212d8_key -iv $encrypted_7258158212d8_iv -in _build/travis-juniper.enc -out ~/.ssh/id_rsa -d - chmod 600 ~/.ssh/id_rsa + mkdir -p ~/.ssh + openssl aes-256-cbc -K $encrypted_7258158212d8_key -iv $encrypted_7258158212d8_iv -in _build/travis-juniper.enc -out ~/.ssh/id_rsa -d + chmod 600 ~/.ssh/id_rsa - git clone --branch gh-pages git@github.com:mhallin/juniper deploy_docs - cd deploy_docs + git clone --branch gh-pages git@github.com:mhallin/juniper deploy_docs + cd deploy_docs - git config user.name 'Juniper Documentation Builder' - git config user.email 'nobody@example.com' + git config user.name 'Juniper Documentation Builder' + git config user.email 'nobody@example.com' - rm -rf * - mv ../target/doc/* . + rm -rf * + mv ../target/doc/* . - echo '' > index.html + echo '' > index.html - git add -A * - git commit -qm 'Update documentation for Juniper' - git push -q origin gh-pages + git add -A * + git commit -qm 'Update documentation for Juniper' + git push -q origin gh-pages + fi