From e6afcba890ce6cf196f830b3449365a683557555 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Fri, 27 Oct 2017 16:48:50 -0400 Subject: [PATCH] Publish RFCs as mdbook to GitHub pages. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spoke with someone at Rust Belt Rust who mentioned this idea (@mre 👋) and decided to take a stab at it. I originally implemented this upstream in the Rust source repository (by adding a git submodule and dynamically generating the contents of the book there). But then then I spoke with @steveklabnik and agreed that doing it in CI in this repository would be a lot easier. --- .gitignore | 2 ++ .travis.yml | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 .travis.yml diff --git a/.gitignore b/.gitignore index b25c15b81..da4e4fe37 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ *~ +book/ +src/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..c1aafe525 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +language: rust +script: + - (cargo install mdbook --git https://github.com/azerupi/mdBook.git --force || true) + - mkdir src + - echo "[Introduction](introduction.md)\n" >> src/SUMMARY.md + - | + for f in $(ls text/* | sort) + do + echo "- [$(basename $f ".md")]($(basename $f))" >> src/SUMMARY.md + mv $f src + done + - cp README.md src/introduction.md + - mdbook build -d . +deploy: + provider: pages + skip_cleanup: true + github_token: $GITHUB_TOKEN + on: + branch: master