Skip to content

Commit 4cba0ba

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

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/build-docs.yml

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

0 commit comments

Comments
 (0)