Skip to content

Commit 1aa6db9

Browse files
committed
Fix missing icons
1 parent ac84857 commit 1aa6db9

3 files changed

Lines changed: 27 additions & 4 deletions

File tree

.github/workflows/docs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- "usage-*.md"
1313
- "scripting.md"
1414
- "res/icons/**"
15+
- "doc/gen/**"
1516
pull_request:
1617
branches: [main, master]
1718
paths:
@@ -22,6 +23,7 @@ on:
2223
- "usage-*.md"
2324
- "scripting.md"
2425
- "res/icons/**"
26+
- "doc/gen/**"
2527

2628
jobs:
2729
sphinx:
@@ -36,5 +38,5 @@ jobs:
3638
- name: Install doc dependencies
3739
run: pip install -r docs/requirements.txt
3840

39-
- name: Build HTML
40-
run: sphinx-build -b html docs docs/_build
41+
- name: Build HTML (warnings are errors; matches Read the Docs)
42+
run: sphinx-build -b html -W --keep-going docs docs/_build

.readthedocs.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ build:
1818

1919
sphinx:
2020
configuration: docs/conf.py
21-
# Enable after fixing Sphinx warnings (missing doc/gen images, README xrefs):
22-
# fail_on_warning: true
21+
fail_on_warning: true
2322

2423
python:
2524
install:

docs/conf.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,23 @@ def _sync_user_docs() -> None:
3737
shutil.copytree(doc_gen_src, doc_gen_dst, dirs_exist_ok=True)
3838

3939

40+
def _verify_doc_assets() -> None:
41+
"""Fail the build early if synced assets are missing (catches RTD/checkout issues)."""
42+
required = [
43+
DOCS_DIR / "res" / "icons" / "Draft_Rotate.png",
44+
DOCS_DIR / "doc" / "gen" / "rotate_constrain_axis.png",
45+
]
46+
missing = [p.relative_to(DOCS_DIR) for p in required if not p.is_file()]
47+
if missing:
48+
raise RuntimeError(
49+
"Documentation assets missing after sync from repo root: "
50+
+ ", ".join(str(p) for p in missing)
51+
+ ". Ensure res/icons/ and doc/gen/ are committed."
52+
)
53+
54+
4055
_sync_user_docs()
56+
_verify_doc_assets()
4157

4258
project = "EzyCad"
4359
copyright = "2026, trailcode"
@@ -59,6 +75,12 @@ def _sync_user_docs() -> None:
5975
"Thumbs.db",
6076
".DS_Store",
6177
"requirements.txt",
78+
"readthedocs.md",
79+
]
80+
81+
# Same-page #anchors in usage.md are not myst cross-refs; do not fail the build on them.
82+
suppress_warnings = [
83+
"myst.xref_missing",
6284
]
6385

6486
html_theme = "sphinx_rtd_theme"

0 commit comments

Comments
 (0)