From 8f5802bf7ef0c9c04752f06389da181f5be90108 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 29 Dec 2019 21:55:40 -0800 Subject: [PATCH] Add workflow to build GH pages on pushes to master --- .github/workflows/pages.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/pages.yml diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 000000000..72bfadaa8 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,41 @@ +name: pages + +on: + push: + branches: + - master + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Install Rust + run: | + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable + source $HOME/.cargo/env + rustup update stable + - name: Cache cargo registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: cargo-registry-mdbook + - name: Cache cargo index + uses: actions/cache@v1 + with: + path: ~/.cargo/git + key: cargo-index-mdbook + - name: Install mdBook + run: | + (test -x $HOME/.cargo/bin/mdbook || (cd && cargo install --vers "^0.3" mdbook)) + - name: Build + run: ci/build-docs.sh + - name: Deploy + if: success() + uses: crazy-max/ghaction-github-pages@v1 + with: + target_branch: gh-pages + build_dir: gh_pages + env: + GITHUB_PAT: ${{ secrets.GH_PAT }}