-
-
Notifications
You must be signed in to change notification settings - Fork 97
133 lines (115 loc) · 4.23 KB
/
Copy pathdocs.yml
File metadata and controls
133 lines (115 loc) · 4.23 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: Deploy Documentation
on:
push:
branches:
- main
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'rust/**'
- '.github/workflows/docs.yml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
lfs: false
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.12'
- name: Setup Rust
# Pin to a commit on the action's `master` branch and pass
# `toolchain: stable` explicitly. The `stable`/`nightly`/`beta`
# branches force-push snapshot commits that get garbage-collected
# when the toolchain advances — pinning to a `stable`-branch SHA
# would silently break the build the next time stable ships.
# See dtolnay/rust-toolchain README and PR #692 Codex review.
uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master 2026-05
with:
toolchain: stable
- name: Cache pip dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-docs.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache Cargo
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libglib2.0-dev libcairo2-dev libpango1.0-dev libatk1.0-dev libgdk-pixbuf2.0-dev libgtk-3-dev
- name: Install Python dependencies
run: pip install -r requirements-docs.txt
- name: Build MkDocs
run: mkdocs build --strict
- name: Build Rustdoc
run: cargo doc --no-deps --workspace
continue-on-error: true
- name: Copy Rustdoc to site
run: |
if [ -d "target/doc" ]; then
mkdir -p site/api/rust
cp -r target/doc/* site/api/rust/
fi
continue-on-error: true
- name: Create .nojekyll file
run: touch site/.nojekyll
- name: Verify site structure
run: |
echo "Site directory contents:"
ls -la site/ | head -20
echo ""
echo "Checking for index.html:"
ls -la site/index.html || echo "index.html not found!"
echo ""
echo "Site directory size:"
du -sh site/
- name: Setup Pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- name: Upload artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: site
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
with:
# A push burst to main (every rust/** change triggers this workflow)
# can leave several Pages deployments backlogged on GitHub's backend,
# which processes one per environment at a time. The action's default
# 10-minute poll window (timeout: 600000) is too tight for that
# backlog and turns a recoverable delay into a hard failure: a run
# timed out at deployment_queued while the very next push deployed
# fine. Give the backend more runway before aborting.
timeout: 1200000 # 20 minutes (default 600000 = 10 min)
error_count: 20 # tolerate more transient status-API blips (default 10)