Skip to content

Commit 38cbd2e

Browse files
committed
Added build scripts
1 parent 03b4575 commit 38cbd2e

File tree

5 files changed

+71
-8
lines changed

5 files changed

+71
-8
lines changed

.bookignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
# Ignore the "resources" folder (it holds files, which are not part of the book assets)
22
resources/*
3+
4+
# Ignore files, which are part of the repo, but are not part of the final output
5+
.gitignore
6+
.bookignore
7+
*.cmd
8+
ISSUE_TEMPLATE.md
9+
LICENSE.md
10+
cover.jpg
11+
.github/*

.github/workflows/gitbook-deploy.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
# Check out the repo first
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
# Run this action to build and publish gitbook
14+
- name: Publish
15+
uses: tuliren/[email protected]
16+
with:
17+
github_token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
# Node rules:
2-
## Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
1+
## Grunt intermediate storage
32
.grunt
43

5-
## Dependency directory
6-
## Commenting this out is preferred by some people, see
7-
## https://docs.npmjs.com/misc/faq#should-i-check-my-node_modules-folder-into-git
4+
## Dependency directory (npm)
85
node_modules
9-
.idea
10-
.vscode
116

127
# Book build output
138
_book
@@ -19,7 +14,6 @@ _book
1914

2015
**/*.DS_Store
2116

22-
2317
# VScode
2418
.vscode
2519
.vscode/*
@@ -30,3 +24,9 @@ _book
3024
/resources/Prepress-Scripts/Prepress-Book-in-MS-Word/obj
3125
/resources/Prepress-Scripts/Prepress-Book-in-MS-Word/.vs
3226
/resources/Prepress-Scripts/Prepress-Book-in-MS-Word/bin
27+
28+
# PyCharm
29+
.idea/*
30+
31+
# GitHub Pages deployment folder
32+
_gh-pages

gitbook-build-deploy-site.cmd

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
REM npm install -g gitbook-cli
2+
3+
call gitbook install
4+
5+
call gitbook build . --log=debug --debug
6+
7+
git worktree add ./_gh-pages gh-pages
8+
9+
cd _gh-pages
10+
11+
xcopy /s /y ..\_book .
12+
13+
git add .
14+
15+
git status
16+
17+
git commit -m "Book web site deployment"
18+
19+
git push
20+
21+
cd ..
22+
23+
git worktree remove ./_gh-pages
24+
25+
pause

gitbook-build-run-local.cmd

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
REM npm install -g gitbook-cli
2+
REM npm install -g serve
3+
4+
call gitbook install
5+
6+
call gitbook build . --log=debug --debug
7+
8+
start serve _book
9+
10+
start "" http://127.0.0.1:5000
11+
12+
pause

0 commit comments

Comments
 (0)