From 6f02778d26b5f44bb371245196529b78035e3176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20H=C3=A5kansson?= Date: Wed, 30 Jun 2021 21:22:25 +0200 Subject: [PATCH] chore(ci): Add build and deploy book --- .github/workflows/book.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/book.yml diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml new file mode 100644 index 0000000..c65b532 --- /dev/null +++ b/.github/workflows/book.yml @@ -0,0 +1,38 @@ +name: Build and deploy documentation book + +on: + push: + branches: + - master + +jobs: + book: + name: Build and deploy book + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Install mdbook + run: | + (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update) + (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.2" mdbook) + cargo install-update -a + + - name: Build book + run: | + mdbook --version + (cd docs && mv _theme theme && mdbook build) + rustc ./docs/_installer/build-installer.rs + ./build-installer + + - name: Deploy book + uses: JamesIves/github-pages-deploy-action@4.1.4 + with: + branch: gh-pages + folder: docs + token: ${{ secrets.GITHUB_TOKEN }} + single-commit: true