gitbook-action

Gitbook Action

This action builds and publishes a gitbook to github pages and other pages. Click here for more information.

GitHub MarketPlace Page Community

How to Use

STEP1 Add Action

Add .github/workflows/gitbook-action.ymlin your repo, with following content.

name: 'Gitbook Action Build'
on:
  push:
    branches:
      - master
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout action
      uses: actions/checkout@v2
    - name: Gitbook Action
      uses: meese-enterprises/gitbook-action@master
      with:
        token: $
Detailed step Official introduction

STEP2 Generate Token and add to Secrets

Create token from https://github.com/settings/tokens

Detailed step Official introduction

Add your token to https://github.com/yourname/yourrepo/settings/secrets

Detail step Official introduction

STEP3 Choose options

Option

For global

For Source Repo

For Publish Repo

For Gitbook Setting

For other repo

For Source2 repo

For Publish2 repo

For Publish3 repo

Example

name: "Gitbook-Action"

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout action
      uses: actions/checkout@v1

    # example1--> https://ZanderZhao.github.io/gitbook-action
    - name: Gitbook Action
      uses: meese-enterprises/gitbook-action@master
      with:
        token: $
        time_zone: Asia/Shanghai   # set time zone
        source_dir: source         # clone from source
        source_edit_time: true     # source time
        publish_commit_message: $  # use last commit message

    # example2--> https://ZanderZhao.github.io/gitbook-action/gitbook-docs
    - name: Gitbook Action
      uses: meese-enterprises/gitbook-action@master
      with:
        token: $
        time_zone: Asia/Shanghai
        source_repo: GitbookIO/gitbook    # clone from https://github.com/GitbookIO/gitbook.git
        source_branch: master             # clone source master
        source_dir: docs                  # gitbook-sorce at dir:docs
        publish_dir: gitbook-docs            # publish for this repo dir:gitbook-docs
        publish2_repo: gitbook-org/gitbook   # publish for another repo dir default root

FAQ

ERROR

WARNING

Q&A

        source_repo: GitbookIO/gitbook
        source_branch: master
        source_dir: docs

Community

Gitter

External links