Skip to content

Commit 84409bc

Browse files
committed
Add RustAPI Cookbook documentation and CI deploy
Introduces a new 'cookbook' documentation using mdBook under docs/cookbook, including architecture and recipes sections. Adds a GitHub Actions workflow to build and deploy the cookbook to GitHub Pages. Updates Cargo.toml to remove example crates from the workspace and refines the benchmarking script for improved usability and options.
1 parent ccbf011 commit 84409bc

File tree

20 files changed

+623
-944
lines changed

20 files changed

+623
-944
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy Cookbook
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- 'docs/cookbook/**'
8+
- '.github/workflows/deploy-cookbook.yml'
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write # To push to gh-pages branch
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Install mdBook
21+
uses: peaceiris/actions-mdbook@v2
22+
with:
23+
mdbook-version: 'latest'
24+
25+
- name: Build Cookbook
26+
run: mdbook build docs/cookbook
27+
28+
- name: Deploy to GitHub Pages
29+
uses: peaceiris/actions-gh-pages@v3
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
publish_dir: ./docs/cookbook/book
33+
destination_dir: cookbook
34+
keep_files: true # Keep existing files in gh-pages if any (useful if main site is also there)
35+
commit_message: "Deploy cookbook: ${{ github.event.head_commit.message }}"

0 commit comments

Comments
 (0)