about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide/ci
diff options
context:
space:
mode:
authorMichael Bryan <michaelfbryan@gmail.com>2018-01-17 12:30:45 +0800
committerMichael Bryan <michaelfbryan@gmail.com>2018-01-17 12:30:45 +0800
commit6a76becdbf8d9ef23c79b3450ef4cf7c616402cb (patch)
tree09699bec932098bed517af1f6d14ab1135d0db35 /src/doc/rustc-dev-guide/ci
parent13b379d3d344a62b400a75cd95c76ac406fb101d (diff)
downloadrust-6a76becdbf8d9ef23c79b3450ef4cf7c616402cb.tar.gz
rust-6a76becdbf8d9ef23c79b3450ef4cf7c616402cb.zip
Created a couple basic CI scripts
Diffstat (limited to 'src/doc/rustc-dev-guide/ci')
-rw-r--r--src/doc/rustc-dev-guide/ci/github_pages.sh10
-rw-r--r--src/doc/rustc-dev-guide/ci/install.sh6
2 files changed, 16 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
diff --git a/src/doc/rustc-dev-guide/ci/install.sh b/src/doc/rustc-dev-guide/ci/install.sh
new file mode 100644
index 00000000000..d9cb369e548
--- /dev/null
+++ b/src/doc/rustc-dev-guide/ci/install.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+set -ex
+
+if command -v ghp-import >/dev/null 2>&1; then
+    pip install ghp-import
+fi
\ No newline at end of file