Skip to content

Commit 8093fa1

Browse files
author
Claude Sonnet (coordinator)
committed
ci: add mdbook docs build and deploy to GitHub Pages
1 parent e337c73 commit 8093fa1

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,32 @@ jobs:
9696
tag_name: ${{ env.VERSION }}
9797
files: dist/ledgerr-mcp-x86_64-unknown-linux-gnu.mcpb
9898
env:
99-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100+
101+
docs:
102+
needs: test-and-build
103+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/feature/'))
104+
runs-on: ubuntu-latest
105+
permissions:
106+
contents: write
107+
steps:
108+
- name: Checkout
109+
uses: actions/checkout@v4
110+
111+
- name: Install Rust
112+
uses: dtolnay/rust-toolchain@stable
113+
114+
- name: Install mdbook
115+
run: |
116+
cargo install mdbook --locked
117+
cargo install mdbook-mermaid --locked
118+
cargo install mdbook-linkcheck --locked
119+
120+
- name: Build mdbook
121+
run: mdbook build book
122+
123+
- name: Deploy to GitHub Pages
124+
uses: peaceiris/actions-gh-pages@v3
125+
with:
126+
github_token: ${{ secrets.GITHUB_TOKEN }}
127+
publish_dir: ./book/book

0 commit comments

Comments
 (0)