From 526119e4126653504ce1b102f18f196dc8fb68d6 Mon Sep 17 00:00:00 2001 From: 3TUSK Date: Wed, 10 Jan 2024 23:29:19 -0800 Subject: [PATCH] meta(github): use github action to build book --- .github/workflow/deploy.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflow/deploy.yml diff --git a/.github/workflow/deploy.yml b/.github/workflow/deploy.yml new file mode 100644 index 00000000..bc532d18 --- /dev/null +++ b/.github/workflow/deploy.yml @@ -0,0 +1,36 @@ +name: Deploy Pages +on: + push: + paths: + - 'chapter*/**' + - 'preface/**' + - 'SUMMARY.md' + - 'README.md' +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Legacy Node.js + uses: actions/setup-node + with: + node-version: 10 + - name: Build GitBook + shell: bash + run: | + gitbook install . + gitbook build . + - name: Setup Modern Node.js + uses: actions/setup-node + with: + node-version: current + - name: Get Wrangler + shell: bash + run: npm install wrangler --save-dev + - name: Publish + shell: bash + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_TOKEN }} + run: npx wrangler pages deploy _book/ --project-name tcd-harbinger \ No newline at end of file