You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Gitbook Action
v1.2.2
This action builds and publishes a gitbook to github pages and other pages. Click here for more information.
Add .github/workflows/gitbook-action.yml
in your repo, with following content.
name: 'Gitbook Action Build'
on:
push:
branches:
- master # trigger branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout action
uses: actions/checkout@v2
- name: Gitbook Action
uses: zanderzhao/gitbook-action@v1.2.2
with:
token: ${{ secrets.PERSONAL_TOKEN }}
Detailed step Official introduction
Create token from https://github.com/settings/tokens
- choose repo
- click Generate token
Detailed step Official introduction
Add your token to https://github.com/ yourname/yourrepo /settings/secrets
- Name: PERSONAL_TOKEN
- Value: which you get before
Detail step Official introduction
- Set Default Above
- Source branch is
master
, and the target branch isgh-pages
. Ifgh-pages
does not exist, it will be created automatically.
- Source branch is
- More Options And Example.
- Introduction on https://ZanderZhao.github.io/gitbook-action/#option
- Source repo and publish repo can be different
- Source git from other people
- Choose your own gitbook version
- Clean commit history
- Keep time setting of file
- ... ...
- Introduction on https://ZanderZhao.github.io/gitbook-action/#option
The following is options, click here, to detail
# for global
time_zone
git_name
git_email
# for source
source_repo
source_branch
source_dir
source_edit_time
source_token
source_git_name
source_hub
# for publish
publish_repo
publish_commit_message
publish_hub
publish_branch
publish_dir
publish_commit_history
publish_cname
publish_push_force
publish_token
publish_git_name
publish_git_email
publish_remove_last_build
# for gitbook
gitbook_cli_version
gitbook_version
gitbook_pdf
gitbook_pdf_dir
gitbook_pdf_name
gitbook_epub
gitbook_epub_dir
gitbook_epub_name
gitbook_mobi
gitbook_mobi_dir
gitbook_mobi_name
# for source2
source2_repo
source2_git_name
source2_token
source2_hub
source2_branch
source2_dir
source2_edit_time
# for publish2
publish2_repo
publish2_git_name
publish2_token
publish2_git_email
publish2_commit_message
publish2_hub
publish2_branch
publish2_commit_history
publish2_dir
publish2_cname
publish2_push_force
publish2_remove_last_build
# for publish3
publish3_repo
publish3_git_name
publish3_token
publish3_git_email
publish3_commit_message
publish3_hub
publish3_branch
publish3_commit_history
publish3_dir
publish3_cname
publish3_push_force
publish3_remove_last_build
font_install
not_clean