-
Notifications
You must be signed in to change notification settings - Fork 1
114 lines (99 loc) · 3.5 KB
/
Copy pathdocs.yml
File metadata and controls
114 lines (99 loc) · 3.5 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Deploy documentation
on:
push:
branches: ["master"]
workflow_dispatch:
concurrency:
group: deploy-documentation
cancel-in-progress: true
permissions:
contents: read
jobs:
deploy:
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 60
env:
CARGO_TERM_COLOR: always
# gxhash requires an explicit x86 baseline when Cargo analyzes the engine.
RUSTFLAGS: "-C target-feature=+aes,+sse2"
steps:
- uses: actions/checkout@v7
- name: Check deployment credentials
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
if [[ -z "$CLOUDFLARE_ACCOUNT_ID" ]]; then
echo "::error::Missing CLOUDFLARE_ACCOUNT_ID. Add it as a GitHub Actions repository secret."
exit 1
fi
if [[ -z "$CLOUDFLARE_API_TOKEN" ]]; then
echo "::error::Missing CLOUDFLARE_API_TOKEN. Add it as a GitHub Actions repository secret."
exit 1
fi
- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.0
# Vite's executable uses Node even when Bun launches the package script.
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 24
- name: Cache Bun packages
uses: actions/cache@v6
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-docs-bun-${{ hashFiles('docs-site/bun.lock') }}
restore-keys: |
${{ runner.os }}-docs-bun-
- name: Install Rust toolchain
run: rustup toolchain install nightly-2026-08-31 --profile minimal
- name: Cache Cargo downloads and API documentation tools
uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
target/api-docs-tools
key: ${{ runner.os }}-docs-cargo-${{ hashFiles('Cargo.lock', 'scripts/generate-api-docs.sh') }}
restore-keys: |
${{ runner.os }}-docs-cargo-
- name: Cache Rust API build artifacts
uses: actions/cache@v6
with:
path: target/api-docs-json
# Source-sensitive keys let the immutable cache advance after engine changes.
key: ${{ runner.os }}-docs-target-${{ hashFiles('Cargo.lock', 'Cargo.toml', 'scripts/generate-api-docs.sh', 'crates/**') }}
restore-keys: |
${{ runner.os }}-docs-target-
- name: Install Linux documentation dependencies
run: |
# Rustdoc analyzes every public feature, including native audio and graphics crates.
sudo apt-get update
sudo apt-get install -y \
cmake \
pkg-config \
libasound2-dev \
libx11-dev \
libx11-xcb-dev \
libxcb1-dev \
libxrandr-dev \
libxi-dev \
libgl1-mesa-dev \
libudev-dev \
libxkbcommon-dev \
libwayland-dev \
libvulkan-dev
- name: Install documentation dependencies
working-directory: docs-site
run: bun ci
- name: Build documentation
working-directory: docs-site
run: bun run build
- name: Deploy documentation
working-directory: docs-site
run: bun run deploy
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}