Skip to content

Commit 9251d35

Browse files
committed
Added a build script for GitHub Actions; deleted broken plugin
1 parent d8cc207 commit 9251d35

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

.github/workflows/gitbook-deploy.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Gitbook Build & Deploy to gh-pages
2+
3+
on: [workflow_dispatch]
4+
5+
jobs:
6+
build-and-publish:
7+
name: Build and Deploy Gitbook
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout the source code from GitHub
11+
uses: actions/checkout@v2
12+
with: { fetch-depth: 0 }
13+
- name: Install Node.js (version 10, not higher!)
14+
uses: actions/setup-node@v2
15+
with: { node-version: '10' }
16+
- name: Install Gitbook CLI client (gitbook-cli)
17+
run: npm install -g gitbook-cli
18+
- name: Install Gitbook plugins (git install)
19+
run: gitbook install
20+
- name: Build the book to the `_book` folder (git build)
21+
run: gitbook build . --log=debug --debug
22+
- name: Checkout the `gh-pages` branch into the `_gh-pages` folder
23+
run: git worktree add ./_gh-pages gh-pages
24+
- name: Copy the compiled book files to `_gh-pages`
25+
run: cp -R ./_book/* ./_gh-pages
26+
- name: Commit and push the changed book files in the `gh-pages` branch
27+
run: |
28+
cd _gh-pages
29+
git add .
30+
git status
31+
git config --local user.name "github-actions-gitbook-bot"
32+
git config --local user.email "[email protected]"
33+
git commit -m "Book web site deployment"
34+
git push

book.json

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"anchors",
1414
"expandable-chapters-small",
1515
"katex",
16-
"sitemap",
1716
"scripts",
1817
"page-toc-button"
1918
],

0 commit comments

Comments
 (0)