STEP1 Add Action

Add .github/workflows/gitbook-action.ymlin 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.4
      with:
        token: ${{ secrets.PERSONAL_TOKEN }}

STEP2 Greate Token and add to Secrets

step2.1 Create token

step2.2 Add token to repo

STEP3 Choose options

  • Set Default Above
    • Source branch is master, and the target branch is gh-pages. If gh-pages does not exist, it will be created automatically.
  • More Options And Example.
    • Introduction on https://ZanderZhao.github.io/gitbook-action/
      • 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
      • ... ...

results matching ""

    No results matching ""