about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide/ci/github_pages.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/rustc-dev-guide/ci/github_pages.sh')
-rw-r--r--src/doc/rustc-dev-guide/ci/github_pages.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/ci/github_pages.sh b/src/doc/rustc-dev-guide/ci/github_pages.sh
new file mode 100644
index 00000000000..603b280f983
--- /dev/null
+++ b/src/doc/rustc-dev-guide/ci/github_pages.sh
@@ -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
\ No newline at end of file