From ef25f64543ae8c44fad38a429ef66a63a1313f32 Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Tue, 26 Oct 2021 23:05:27 +0100 Subject: [PATCH] Build book using gh actions --- book/CNAME | 1 + .github/workflows/book.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/book/CNAME b/book/CNAME new file mode 100644 index 0000000..31e96f2 100644 --- /dev/null +++ a/book/CNAME @@ -1,0 +1,1 @@ +book.chart.rs diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml new file mode 100644 index 0000000..9f7b3a4 100644 --- /dev/null +++ a/.github/workflows/book.yml @@ -1,0 +1,28 @@ +name: github pages + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v2 + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: 'latest' + - run: | + cd book/ + mdbook build + cp CNAME book/ + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./book/book -- rgit 0.1.3