Skip to content

Commit ebef0ce

Browse files
authored
Create docs.yaml
1 parent 2bf2332 commit ebef0ce

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/docs.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Docs
2+
on:
3+
push:
4+
branches: [ main ]
5+
permissions:
6+
contents: read
7+
pages: write
8+
id-token: write
9+
concurrency:
10+
group: deploy
11+
cancel-in-progress: false
12+
jobs:
13+
build:
14+
name: Build
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
- name: Setup Rust
20+
uses: dtolnay/rust-toolchain@stable
21+
- name: Configure cache
22+
uses: Swatinem/rust-cache@v2
23+
- name: Setup pages
24+
id: pages
25+
uses: actions/configure-pages@v5
26+
- name: Clean docs folder
27+
run: cargo clean --doc
28+
- name: Build docs
29+
run: cargo doc --no-deps
30+
- name: Remove lock file
31+
run: rm target/doc/.lock
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: target/doc
36+
deploy:
37+
name: Deploy
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-latest
42+
needs: build
43+
steps:
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)