File tree 2 files changed +34
-1
lines changed
2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change 13
13
" anchors" ,
14
14
" expandable-chapters-small" ,
15
15
" katex" ,
16
- " sitemap" ,
17
16
" scripts" ,
18
17
" page-toc-button"
19
18
],
You can’t perform that action at this time.
0 commit comments