-
-
Notifications
You must be signed in to change notification settings - Fork 154
59 lines (54 loc) · 1.99 KB
/
docs.yml
File metadata and controls
59 lines (54 loc) · 1.99 KB
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
53
54
55
56
57
58
59
on:
push:
branches:
- main
pull_request:
branches:
- main
name: Docs
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings
jobs:
docs:
name: Build and deploy documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
# The full history is required to make mkdocs' git-revision-date-localized plugin work
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
# Deployment is gated on push to main, so PR cache poisoning is not a concern.
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 # zizmor: ignore[cache-poisoning]
- name: Install nextest for help text in docs
uses: taiki-e/install-action@c12d62a803cbdfe2e7263af15f5a9548065cb4f2 # v2.69.3
with:
tool: nextest
- name: Install uv
uses: eifinger/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
with:
enable-cache: true
- name: Build rustdoc
run: ./scripts/build-rustdoc.sh
- name: Build site
run: ./scripts/build-site.sh
- name: Organize
run: |
rm -rf target/gh-pages
mv site/output target/gh-pages
mv target/doc target/gh-pages/rustdoc
- name: Publish
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} # zizmor: ignore[secrets-outside-env]
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} # zizmor: ignore[secrets-outside-env]
command: pages deploy target/gh-pages --project-name=nextest
gitHubToken: ${{ secrets.GITHUB_TOKEN }}