Skip to content

Commit 98e9b28

Browse files
committed
chore: add workflow to publish crate docs to gh pages
1 parent 3309fa6 commit 98e9b28

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/build-docs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build docs and publish to github pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- chore/docs
8+
9+
jobs:
10+
publish:
11+
permissions:
12+
contents: read
13+
id-token: write
14+
pages: write
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup Rust cache
20+
uses: Swatinem/rust-cache@v2
21+
22+
- name: Generate Docs
23+
run: |
24+
cargo doc --workspace --no-deps
25+
26+
- name: Setup Pages
27+
uses: actions/configure-pages@v5
28+
29+
- name: Upload artifact
30+
uses: actions/upload-pages-artifact@v3
31+
with:
32+
path: 'target/doc/'
33+
34+
- name: Deploy to GitHub Pages
35+
id: deployment
36+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)