Commit 5a077ef
committed
Fix multi-format documentation CI: Improve error handling and robustness
Major improvements to documentation build process:
🔧 Enhanced build-docs.sh script:
- Add graceful error handling for failed HTML/Sphinx builds
- Create build directories even when Sphinx fails
- Generate fallback HTML page when build fails
- Improve packaging function to check directory existence
- Better status reporting and exit codes
📝 Improved Sphinx configuration (conf.py):
- Dynamic extension loading with try/catch for optional dependencies
- Core vs optional extension separation
- Better error messages for missing dependencies
- More robust configuration handling
🚀 Updated CI workflow (python-docs.yml):
- Enhanced error handling in build step
- Improved documentation packaging logic
- Conditional artifact uploads based on file existence
- Better failure recovery and partial build support
📁 Repository maintenance:
- Add documentation-output/ to .gitignore
- Prevent accidental commit of generated documentation files
These changes ensure the documentation CI:
1. Handles missing dependencies gracefully
2. Creates useful output even when builds partially fail
3. Provides clear error messages and fallback content
4. Maintains CI stability with better error handling1 parent 01ef458 commit 5a077ef
File tree
3 files changed
+128
-45
lines changed- .github/workflows
- scripts
3 files changed
+128
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| |||
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
114 | 111 | | |
115 | 112 | | |
116 | 113 | | |
117 | 114 | | |
118 | 115 | | |
119 | 116 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 117 | + | |
| 118 | + | |
125 | 119 | | |
126 | 120 | | |
127 | | - | |
128 | | - | |
129 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
130 | 125 | | |
131 | 126 | | |
132 | 127 | | |
| |||
143 | 138 | | |
144 | 139 | | |
145 | 140 | | |
| 141 | + | |
146 | 142 | | |
147 | 143 | | |
148 | 144 | | |
149 | 145 | | |
150 | 146 | | |
151 | 147 | | |
152 | 148 | | |
| 149 | + | |
153 | 150 | | |
154 | 151 | | |
155 | 152 | | |
| |||
165 | 162 | | |
166 | 163 | | |
167 | 164 | | |
| 165 | + | |
168 | 166 | | |
169 | 167 | | |
170 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| |||
173 | 176 | | |
174 | 177 | | |
175 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
176 | 226 | | |
177 | 227 | | |
178 | 228 | | |
| |||
265 | 315 | | |
266 | 316 | | |
267 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
268 | 325 | | |
269 | 326 | | |
270 | 327 | | |
| |||
359 | 416 | | |
360 | 417 | | |
361 | 418 | | |
| 419 | + | |
| 420 | + | |
362 | 421 | | |
363 | 422 | | |
364 | 423 | | |
365 | | - | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
366 | 427 | | |
367 | 428 | | |
368 | 429 | | |
369 | 430 | | |
370 | 431 | | |
371 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
372 | 435 | | |
373 | 436 | | |
374 | 437 | | |
375 | 438 | | |
376 | | - | |
| 439 | + | |
377 | 440 | | |
378 | 441 | | |
379 | 442 | | |
| |||
386 | 449 | | |
387 | 450 | | |
388 | 451 | | |
389 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
390 | 458 | | |
391 | 459 | | |
392 | 460 | | |
393 | | - | |
394 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
395 | 465 | | |
396 | 466 | | |
397 | | - | |
398 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
399 | 483 | | |
400 | 484 | | |
401 | 485 | | |
| |||
0 commit comments