File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 - " usage-*.md"
1313 - " scripting.md"
1414 - " res/icons/**"
15+ - " doc/gen/**"
1516 pull_request :
1617 branches : [main, master]
1718 paths :
2223 - " usage-*.md"
2324 - " scripting.md"
2425 - " res/icons/**"
26+ - " doc/gen/**"
2527
2628jobs :
2729 sphinx :
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
Original file line number Diff line number Diff line change 1818
1919sphinx :
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
2423python :
2524 install :
Original file line number Diff line number Diff 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
4258project = "EzyCad"
4359copyright = "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
6486html_theme = "sphinx_rtd_theme"
You can’t perform that action at this time.
0 commit comments