-
Notifications
You must be signed in to change notification settings - Fork 3
executable file
·70 lines (58 loc) · 2.19 KB
/
gitbook.yml
File metadata and controls
executable file
·70 lines (58 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Gitbook
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.15.0"
- name: build gitbook
run: |
cat /etc/os-release && whoami
[ -d _book ] && sudo rm -rf _book
echo "node -v" && node -v
echo "npm -v" && npm -v
sudo npm install gitbook-cli --global
echo "gitbook -V" && gitbook -V
chmod -R 777 ./*
rm -f package-lock.json package.json
gitbook install --log=debug --debug
gitbook build --log=debug --debug
# sudo docker run -i --rm -v `pwd`:/docs humangeo/gitbook gitbook help
# pwd
#ls -l
# echo "node -v" && node -v
# echo "npm -v" && npm -v
# sudo npm install gitbook-cli@2.3.2 --global
# cd /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules
# sudo npm install graceful-fs@latest --save
# cd -
# echo "gitbook -V" && gitbook -V
# sudo gitbook install --log=debug --debug
# sudo gitbook build ./ --log=debug --debug
# sudo sed -i '62,64d' /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js
# npm install -g gitbook-cli
# gitbook install
# gitbook build
# env:
# CI: true
# - name: Deploy to gh-pages branch
# uses: JamesIves/github-pages-deploy-action@releases/v3
# with:
# ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# BRANCH: gh-pages
# FOLDER: _book/
# - name: Deploy to Aliyun oss
# uses: manyuanrong/setup-ossutil@v2.0
# with:
# endpoint: "oss-cn-shanghai.aliyuncs.com"
# access-key-id: ${{ secrets.ALI_ACCESS_KEY_ID }}
# access-key-secret: ${{ secrets.ALI_ACCESS_KEY_SECRET }}
# sts-token: ""
# - run: ossutil cp -rf ./_book oss://gitbooks/