Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: rust

cache: pip

install:
- bash ci/install.sh
- source ~/.cargo/env || true

script:
- true

after_success:
- bash ci/github_pages.sh

notifications:
email:
on_success: never
10 changes: 10 additions & 0 deletions ci/github_pages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -ex

BOOK_DIR=book

# Only upload the built book to github pages if it's a commit to master
if [ "$TRAVIS_BRANCH" = master -a "$TRAVIS_PULL_REQUEST" = false ]; then
mdbook build
ghp-import $BOOK_DIR
fi
6 changes: 6 additions & 0 deletions ci/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -ex

if command -v ghp-import >/dev/null 2>&1; then
pip install ghp-import
fi