Skip to content

update github-action, add 'install calibre' #5

update github-action, add 'install calibre'

update github-action, add 'install calibre' #5

name: 'Gitbook Action Build'
on:
push:
branches:
- main # trigger branch
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10]
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install GitBook CLI
run: npm install -g gitbook-cli
- name: Install GitBook Plugins
run: gitbook install
- name: Build GitBook
run: gitbook build . ./_book
- name: Generate GitBook pdf
run: |
apt install calibre
gitbook pdf . ./_book/Notes.pdf
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_book
publish_branch: gh-pages