Skip to content

Commit a959978

Browse files
authored
docs: Add mdBook documentation framework (#63)
1 parent 0aadeaf commit a959978

26 files changed

Lines changed: 1595 additions & 351 deletions

.github/workflows/docs.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- docs # Also deploy from docs branch for testing
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup mdBook
27+
uses: peaceiris/actions-mdbook@v2
28+
with:
29+
mdbook-version: 'latest'
30+
31+
- name: Install mdbook-mermaid
32+
run: |
33+
VERSION=$(curl -s https://api.github.com/repos/badboy/mdbook-mermaid/releases/latest | grep tag_name | cut -d '"' -f 4)
34+
curl -sSL "https://github.com/badboy/mdbook-mermaid/releases/download/${VERSION}/mdbook-mermaid-${VERSION}-x86_64-unknown-linux-gnu.tar.gz" | tar -xz
35+
sudo mv mdbook-mermaid /usr/local/bin/
36+
mdbook-mermaid install .
37+
38+
- name: Install mdbook-linkcheck
39+
run: |
40+
curl -sSL https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/latest/download/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip -o linkcheck.zip
41+
unzip -q -o linkcheck.zip
42+
chmod +x mdbook-linkcheck
43+
sudo mv mdbook-linkcheck /usr/local/bin/
44+
45+
- name: Build documentation
46+
run: mdbook build
47+
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: ./book/html
52+
53+
deploy:
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
runs-on: ubuntu-latest
58+
needs: build
59+
steps:
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ target/
22

33
# Local Claude Code instructions (not committed to repo)
44
CLAUDE.local.md
5-
artifacts/
5+
artifacts/
6+
book
7+
test-build
8+
mermaid*.js

0 commit comments

Comments
 (0)