Last active
October 14, 2021 14:10
-
-
Save SangsooNam/aa73c3e1ff88d30433e4020f1275242a to your computer and use it in GitHub Desktop.
Publish GitBook to Github Pages(gh-pages)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install the plugins and build the static site | |
gitbook install && gitbook build | |
# checkout to the gh-pages branch | |
git checkout 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
git pull origin gh-pages --rebase 에서 error: unknown option `rebase' 라는 에러가 발생합니다.