forked from actix/book
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
34 lines (30 loc) · 1.03 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
language: rust
sudo: false
dist: trusty
cache:
cargo: false
apt: true
matrix:
include:
- rust: stable
- rust: beta
- rust: nightly
allow_failures:
- rust: nightly
# script:
# - |
# #cargo clean
# RUST_BACKTRACE=1 cargo test -- --nocapture
# Upload docs
# after_success:
script:
- export PATH=$PATH:~/.cargo/bin
- |
if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_RUST_VERSION" == "beta" ]]; then
curl -sL https://github.com/rust-lang-nursery/mdBook/releases/download/v0.1.5/mdbook-v0.1.5-x86_64-unknown-linux-gnu.tar.gz | tar xvz -C $HOME/.cargo/bin &&
cd actix && mdbook build -d ../target/doc/actix && cd .. &&
cd actix-web && mdbook build -d ../target/doc/actix-web && cd .. &&
git clone https://github.com/davisp/ghp-import.git &&
./ghp-import/ghp_import.py -n -p -f -m "Documentation upload" -r https://"$GH_TOKEN"@github.com/"$TRAVIS_REPO_SLUG.git" target/doc &&
echo "Uploaded documentation"
fi