forked from KMU-OSS-Laboratory/Open-Source-in-the-Enterprise
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish.sh
More file actions
29 lines (20 loc) · 718 Bytes
/
publish.sh
File metadata and controls
29 lines (20 loc) · 718 Bytes
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
# 이 부분 코드는 https://sangsoonam.github.io/2016/08/02/publish-gitbook-to-your-github-pages.html 의 코드를 일부 변경한 것입니다.
# install the plugins and build the static site
gitbook install && gitbook build
# checkout to the gh-pages branch
git checkout -B gh-pages
# pull the latest updates
git pull origin gh-pages --rebase
# copy the static site files into the current directory.
cp -R _book/* .
# remove 'node_modules' and '_book' directory
git clean -fx node_modules
git clean -fx _book
# add all files
git add .
# commit
git commit -a -m "Update docs"
# push to the origin
git push origin gh-pages
# checkout to the master branch
git checkout master