Skip to content

Commit bba19bd

Browse files
committed
test
1 parent cb3516b commit bba19bd

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
1-
# name: Build my gitbook and deploy to gh-pages
1+
name: Build my gitbook and deploy to gh-pages
22

3-
# on:
4-
# workflow_dispatch:
5-
# push:
6-
# branches:
7-
# - master
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
88

9-
# jobs:
10-
# master-to-gh-pages:
11-
# runs-on: ubuntu-latest
9+
jobs:
10+
master-to-gh-pages:
11+
runs-on: ubuntu-latest
1212

13-
# steps:
14-
# - name: checkout master
15-
# uses: actions/checkout@v2
16-
# with:
17-
# submodules: recursive
18-
# ref: master
13+
steps:
14+
- name: checkout master
15+
uses: actions/checkout@v2
16+
with:
17+
submodules: recursive
18+
ref: master
1919

20-
# - name: install nodejs
21-
# uses: actions/setup-node@v1
20+
- name: install nodejs
21+
uses: actions/setup-node@v1
2222

23-
# - name: configue gitbook
24-
# run: |
25-
# npm install -g gitbook-cli
26-
# gitbook install
27-
# npm install -g gitbook-summary
23+
- name: configue gitbook
24+
run: |
25+
npm install -g gitbook-cli
26+
gitbook install
27+
npm install -g gitbook-summary
2828
29-
# - name: generate _book folder
30-
# run: |
31-
# book sm
32-
# ln -s -f SUMMARY.md Content.md
33-
# gitbook build
34-
# cp SUMMARY.md _book
29+
- name: generate _book folder
30+
run: |
31+
book sm
32+
ln -s -f SUMMARY.md Content.md
33+
gitbook build
34+
cp SUMMARY.md _book
3535
36-
# - name: push _book to branch gh-pages
37-
# env:
38-
# TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
39-
# REF: github.com/${{github.repository}}
40-
# MYEMAIL: kimi0230@gmail.com
41-
# MYNAME: ${{github.repository_owner}}
42-
# run: |
43-
# cd _book
44-
# git config --global user.email "${MYEMAIL}"
45-
# git config --global user.name "${MYNAME}"
46-
# git init
47-
# git remote add origin https://${REF}
48-
# git add .
49-
# git commit -m "Updated By Github Actions With Build ${{github.run_number}} of ${{github.workflow}} For Github Pages"
50-
# git branch -M master
51-
# git push --force --quiet "https://${TOKEN}@${REF}" master:gh-pages
36+
- name: push _book to branch gh-pages
37+
env:
38+
TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
39+
REF: github.com/${{github.repository}}
40+
MYEMAIL: kimi0230@gmail.com
41+
MYNAME: ${{github.repository_owner}}
42+
run: |
43+
cd _book
44+
git config --global user.email "${MYEMAIL}"
45+
git config --global user.name "${MYNAME}"
46+
git init
47+
git remote add origin https://${REF}
48+
git add .
49+
git commit -m "Updated By Github Actions With Build ${{github.run_number}} of ${{github.workflow}} For Github Pages"
50+
git branch -M master
51+
git push --force --quiet "https://${TOKEN}@${REF}" master:gh-pages

0 commit comments

Comments
 (0)