Skip to content

patch

patch #102

Workflow file for this run

# Github Setup:
# 1. settings > pages > branch > pages/root
# 2. settings > actions > general > workflow permissions > read and write permissions
# 3. (optional) in `pages` branch create `index.html` with redirect to `/docs`
name: 🌍 Deploy Book
on:
push:
branches: main
paths: [
'docs/**',
'.github/workflows/book.yml',
]
jobs:
deploy:
name: Build and Deploy
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: πŸ“‚ Checkout
uses: actions/checkout@v4
- name: πŸ“‚ Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: πŸ”¨ Install mdbook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.34'
- name: πŸ”¨ Install mdbook-mermaid
uses: baptiste0928/cargo-install@v2
with:
crate: mdbook-mermaid
version: '0.12.6'
- name: πŸ”¨ Build Book
run: mdbook build
working-directory: ./docs
- name: 🌍 Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: pages
publish_dir: ./docs/book
# destination_dir: docs