feat(docs): add mdbook support (#313)

This commit is contained in:
TurtleRuss
2026-04-14 09:56:45 +08:00
committed by GitHub
parent 9dd9770867
commit 2e3a3cc646
4 changed files with 81 additions and 0 deletions

46
.github/workflows/mdbook.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: mdBook
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: mdbook-pages
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
with:
enablement: true
- name: Install mdBook
run: cargo install mdbook --locked
- name: Build book
run: mdbook build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: book
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4