Git Product home page Git Product logo

gitbook-action's Introduction

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  # trigger branch
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout action
      uses: actions/checkout@v2
    - name: Gitbook Action           # https://github.com/ZanderZhao/gitbook-action/releases
      uses: ZanderZhao/[email protected]  # -> or ZanderZhao/gitbook-action@master.  If not use master click above, use latest please 
      with:                                   #    or fork this repo and use YourName/gitbook-action@master
        token: ${{ secrets.PERSONAL_TOKEN }}  # -> remember add this in settings/secrets as following

Detailed step | Official introduction

STEP2 Generate Token and add to Secrets

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

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.

Note that if the activation branch and the compiled file publishing branch are the same branch, it may cause a dead loop, so you need to cancel the task manually.

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
font_install
not_clean
prepare_install

# 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

Example

Example

FAQ

Q&A

ERROR

WARNING

Community

Gitter

External links

gitbook-action's People

Contributors

gcs-zhn avatar imgbotapp avatar windard avatar zanderzhao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.