From 434c074a79450b2347ab7e7e0001bab0f60857b7 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Tue, 3 Oct 2017 16:18:49 +0200 Subject: [PATCH] travis: use travis deploy instead of doc_upload.sh --- .travis.yml | 66 +++++++++++++++++++++++++++------------------------ doc_upload.sh | 14 ----------- 2 files changed, 35 insertions(+), 45 deletions(-) delete mode 100755 doc_upload.sh diff --git a/.travis.yml b/.travis.yml index db9ec9c..bf822e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,31 @@ branches: only: - master +env: + global: + - RUST_BACKTRACE=1 + matrix: + - FEATURES="" + # test individual features + - FEATURES="backend_winit" + - FEATURES="backend_drm" + - FEATURES="backend_libinput" + - FEATURES="renderer_glium" + # test default features + - FEATURES="default" + # test all features simultaneously + - FEATURES="all" + +matrix: + include: + # special features for lint & fmt + - rust: nightly + env: FEATURES="cargo-fmt" + - rust: nightly + env: FEATURES="cargo-clippy" + allow_failures: + - rust: nightly + before_script: - export PATH=$HOME/.local/bin:$HOME/.cargo/bin:$PATH - | @@ -68,38 +93,17 @@ script: esac after_success: - - | - [ $TRAVIS_RUST_VERSION = "stable" ] && - [ $TRAVIS_BRANCH = "master" ] && - [ $TRAVIS_PULL_REQUEST = "false" ] && - [ $FEATURES = "all" ] && - ./doc_upload.sh -env: - global: - - RUST_BACKTRACE=1 - - secure: lJjdHvIm6Pzimdik+SafO/MOWLLGY5TJdI7hWcwQ4+XNjuwncKx9ZJ8zqr2xClUKSALvUWB+vdu7i9wTWtsOYnDpyy8wuRvBZoaD5c8H2igsnzmGPPtP5KlPi5sEYvcCRY4vf9GDrvZm6tkNwMRsJBJ+2W/dSOTudMQA9mkdQcn5x24HVUBBOKEEuNy5ZOHZIj/+tre3USC8PbVvWyC5HHHjjEMBKR3F/BoaR1BJq2u4BdyDGTkfsoUa1zaTjApcZiEEK9KhoWDentkmlJHJCHKxC/zIZGhNx8ukw2yrms6j1k94jXB3rJP97q8UyNFcCO1HVO46EdLB6sFUPAW0CuDM27xIHDv+FyU3ICZVlpKQIK8YPJuLmQbCJFpVvEgfNfCIm+7+4jDci09FmHhuW+wQrTZDsRbCQz2gtVveeoE9/cZy5qAbI+UW4F25GGg9Ycxn+VOBU6Zdg8T9MLRRbHJXCzjMmJrNwK+6fEnCsMoVxwbRF9Fsh2JXS0PFdQgJSGtYYW31HEUEu4zrUuooJtz4CAgR+vB9oBxHfu6Y9GXZFmTsrUyuvGSl5vFB3AXLK6AP3BeXu3Bq2wQDy7ClQxvxkpN/eCKKxwV9vE9nRY0eD1sc6esv2gTjlV+gqs7V7JL8VvZulzZZ2gk6S/GhImCqyhJTqziKR7RXsPRZ2Zw= - matrix: - - FEATURES="" - # test individual features - - FEATURES="backend_winit" - - FEATURES="backend_drm" - - FEATURES="backend_libinput" - - FEATURES="renderer_glium" - # test default features - - FEATURES="default" - # test all features simultaneously - - FEATURES="all" - -matrix: - include: - # special features for lint & fmt - - rust: nightly - env: FEATURES="cargo-fmt" - - rust: nightly - env: FEATURES="cargo-clippy" - allow_failures: - - rust: nightly + - cp ./doc_index.html ./index.html +deploy: + provider: pages + skip_cleanup: true + github_token: $GITHUB_TOKEN + local_dir: "${TRAVIS_BUILD_DIR}/target/doc" + on: + branch: master + rust: stable + env: FEATURES="all" notifications: webhooks: diff --git a/doc_upload.sh b/doc_upload.sh deleted file mode 100755 index b77cfe9..0000000 --- a/doc_upload.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -repo="$TRAVIS_REPO_SLUG" -token="$GH_TOKEN" -commit=$(git rev-parse --short HEAD) -msg="Documentation for $repo@$commit" - -# add a homepage -cp ./doc_index.html ./target/doc/index.html - -git clone https://github.com/davisp/ghp-import -./ghp-import/ghp_import.py -n -m "$msg" target/doc -# pipe output to /dev/null to avoid printing our token in travis log -git push -fq "https://$token@github.com/$repo.git" "gh-pages" > /dev/null