File tree Expand file tree Collapse file tree 2 files changed +74
-0
lines changed
Expand file tree Collapse file tree 2 files changed +74
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build & Deploy GitBook
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches : ["master"]
7+
8+ permissions :
9+ contents : write
10+
11+ concurrency :
12+ group : gitbook-${{ github.ref }}
13+ cancel-in-progress : true
14+
15+ jobs :
16+ build :
17+ runs-on : ubuntu-latest
18+
19+ # CircleCI에서 node:8.12를 쓰고 있어서 호환성 위해 컨테이너로 맞춥니다.
20+ container :
21+ image : node:8.12
22+
23+ steps :
24+ - name : Install git (required in container)
25+ run : |
26+ apt-get update
27+ apt-get install -y git
28+
29+ - name : Checkout
30+ uses : actions/checkout@v4
31+
32+ - name : Build GitBook
33+ run : |
34+ npm install -g gitbook-cli
35+ gitbook install
36+ gitbook build
37+
38+ - name : Upload _book artifact
39+ uses : actions/upload-artifact@v4
40+ with :
41+ name : gitbook-_book
42+ path : _book
43+
44+ deploy :
45+ needs : build
46+ runs-on : ubuntu-latest
47+ if : github.event_name == 'push' && github.ref == 'refs/heads/master'
48+
49+ container :
50+ image : node:8.12
51+
52+ steps :
53+ - name : Install git (required in container)
54+ run : |
55+ apt-get update
56+ apt-get install -y git
57+
58+ - name : Checkout
59+ uses : actions/checkout@v4
60+
61+ - name : Build GitBook
62+ run : |
63+ npm install -g gitbook-cli
64+ gitbook install
65+ gitbook build
66+
67+ - name : Deploy to gh-pages
68+ uses : peaceiris/actions-gh-pages@v4
69+ with :
70+ github_token : ${{ secrets.GITHUB_TOKEN }}
71+ publish_branch : gh-pages
72+ publish_dir : ./_book
Original file line number Diff line number Diff line change 11_book
2+
3+ .idea /
You can’t perform that action at this time.
0 commit comments