Skip to content

Commit 767fc97

Browse files
authored
Merge pull request #5 from Michael-F-Bryan/ci
Set up the basic CI infrastructure
2 parents 831b3ff + 11b19a4 commit 767fc97

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

.travis.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
language: rust
2+
3+
cache: pip
4+
5+
install:
6+
- bash ci/install.sh
7+
- source ~/.cargo/env || true
8+
9+
script:
10+
- true
11+
12+
after_success:
13+
- bash ci/github_pages.sh
14+
15+
notifications:
16+
email:
17+
on_success: never

ci/github_pages.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
BOOK_DIR=book
5+
6+
# Only upload the built book to github pages if it's a commit to master
7+
if [ "$TRAVIS_BRANCH" = master -a "$TRAVIS_PULL_REQUEST" = false ]; then
8+
mdbook build
9+
ghp-import $BOOK_DIR
10+
fi

ci/install.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
if command -v ghp-import >/dev/null 2>&1; then
5+
pip install ghp-import
6+
fi

0 commit comments

Comments
 (0)