File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed
Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -16,18 +16,21 @@ jobs:
1616 - name : Setup Node.js
1717 uses : actions/setup-node@v3
1818 with :
19- node-version : ' 18 '
19+ node-version : ' 16 '
2020
21- - name : Install dependencies
21+ - name : Install and patch gitbook
2222 run : |
23- npm init -y
24- npm install honkit --save-dev
25- npm install web-streams-polyfill --save-dev
26- npm install
23+ npm install -g gitbook-cli
24+ cd /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules
25+ sed -i 's/fs.stat = statFix(fs.stat)/\/\/fs.stat = statFix(fs.stat)/' graceful-fs/polyfills.js
26+ sed -i 's/fs.fstat = statFix(fs.fstat)/\/\/fs.fstat = statFix(fs.fstat)/' graceful-fs/polyfills.js
27+ sed -i 's/fs.lstat = statFix(fs.lstat)/\/\/fs.lstat = statFix(fs.lstat)/' graceful-fs/polyfills.js
28+ cd -
29+ gitbook install
2730
2831 - name : Build documentation
2932 run : |
30- node -e "global.ReadableStream = require('web-streams-polyfill').ReadableStream" -e "require('honkit'). build()"
33+ gitbook build
3134
3235 - name : Deploy to GitHub Pages
3336 uses : peaceiris/actions-gh-pages@v3
Original file line number Diff line number Diff line change 33 "version" : " 1.0.0" ,
44 "description" : " GoBatch Documentation" ,
55 "scripts" : {
6- "serve" : " node -e \" global.ReadableStream = require('web-streams-polyfill').ReadableStream \" -e \" require('honkit'). serve() \" " ,
7- "build" : " node -e \" global.ReadableStream = require('web-streams-polyfill').ReadableStream \" -e \" require('honkit'). build() \" "
6+ "serve" : " gitbook serve" ,
7+ "build" : " gitbook build"
88 },
99 "devDependencies" : {
10- "honkit" : " ^4.0.0" ,
11- "web-streams-polyfill" : " ^3.2.1"
10+ "gitbook-cli" : " ^2.3.2"
1211 }
1312}
You can’t perform that action at this time.
0 commit comments