Skip to content

[docs] - Add MdBook for documentation and GHA workflow #6

[docs] - Add MdBook for documentation and GHA workflow

[docs] - Add MdBook for documentation and GHA workflow #6

Workflow file for this run

name: Deploy Github Pages
on:
push:
branches:
- main
paths:
- 'README.md'
- 'docs/book/**'
pull_request:
paths:
- 'README.md'
- 'docs/book/**'
jobs:
deploy:
runs-on: ubuntu-latest
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.37'
- run: cd docs/book && mdbook build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book/public