-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1 KB
/
doc.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
name: Docs
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: styfle/[email protected]
name: Cancel Outdated Builds
with:
all_but_latest: true
access_token: ${{ github.token }}
- uses: actions/checkout@v3
name: Checkout Repository
- uses: Swatinem/rust-cache@v2
name: Enable Rust Caching
with:
cache-on-failure: true
- name: Install Nix
uses: cachix/install-nix-action@v21
- name: Generate Documentation
run: |
nix develop -c cargo doc --workspace --no-deps --lib --release
echo '<meta http-equiv="refresh" content="0; url=server">' > target/doc/index.html
- name: Deploy Documentation
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc