Continuous Integration
The
gitbook
CLI can be used in a CI environment to publish the integrations for every commit.First store an API token created from app.gitbook.com/account/developer into your GitHub repository secrets.
Then in you workflow:
jobs:
publish:
name: Publish to GitBook
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-[email protected]
with:
node-version: 18.x
- run: npm ci
- run: npm install -g @gitbook/cli
- run: gitbook publish .
env:
GITBOOK_TOKEN: ${{ secrets.GITBOOK_TOKEN }}
Last modified 3mo ago