-
Notifications
You must be signed in to change notification settings - Fork 10
52 lines (42 loc) · 1.14 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Docs
on:
pull_request:
branches: [master]
push:
branches: [master]
permissions:
id-token: write
pages: write
env:
CARGO_TERM_COLOR: always
jobs:
docs:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v4
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Test doc examples
if: github.event_name == 'pull_request'
env:
__GEAR_WASM_BUILDER_NO_BUILD: 1
run: cargo test --doc --workspace
- name: Build docs
env:
RUSTDOCFLAGS: --enable-index-page -Zunstable-options
__GEAR_WASM_BUILDER_NO_BUILD: 1
run: |
cargo doc --no-deps --workspace
rm -f target/doc/.lock
- name: Setup GitHub Pages
if: github.event_name == 'push'
uses: actions/configure-pages@v3
- name: Upload Pages artifact
if: github.event_name == 'push'
uses: actions/upload-pages-artifact@v2
with:
path: target/doc
- name: Deploy to GitHub Pages
if: github.event_name == 'push'
uses: actions/deploy-pages@v2