Skip to content

feat: mdbook

feat: mdbook #2

Workflow file for this run

name: PR Preview
on:
pull_request:
types: [opened, reopened, synchronize, closed]
concurrency:
group: preview-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
if: github.event.action != 'closed'
uses: dtolnay/rust-toolchain@stable
- name: Build project
if: github.event.action != 'closed'
run: cargo build
- name: Setup mdBook
if: github.event.action != 'closed'
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.40'
- name: Install mdbook-admonish
if: github.event.action != 'closed'
run: cargo install mdbook-admonish
- name: Install mdbook-mermaid
if: github.event.action != 'closed'
run: cargo install mdbook-mermaid
- name: Build mdBook
if: github.event.action != 'closed'
run: mdbook build book
- name: Deploy Preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./book/book
preview-branch: gh-pages
umbrella-dir: pr-preview