about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide/ci/github_pages.sh
blob: b0dc26902bf457c4b3f39b7f9ed987bd53401cf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/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 -p $BOOK_DIR
else
    echo Skipping 'mdbook build' because this is not master or this is just a PR.
fi