-
-
Notifications
You must be signed in to change notification settings - Fork 99
49 lines (47 loc) · 1.51 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
on:
push:
branches:
- main
pull_request:
branches:
- main
name: Docs
env:
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings
jobs:
docs:
name: Build and deploy documentation
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
# The full history is required to make mkdocs' git-revision-date-localized plugin work
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2
- name: Install nextest for help text in docs
uses: taiki-e/install-action@nextest
- name: Install uv
uses: eifinger/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4.2.0
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/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: nextest
directory: target/gh-pages
gitHubToken: ${{ secrets.GITHUB_TOKEN }}