@@ -213,6 +213,24 @@ def docs():
213213 os .chdir (".." )
214214
215215
216+ def docs_json ():
217+ """Generate docs.json for documentation site."""
218+ print ("Generating docs.json..." )
219+ script_path = Path (".github/insert_docs.py" )
220+ if not script_path .exists ():
221+ print (f"Error: { script_path } not found" )
222+ sys .exit (1 )
223+ result = subprocess .run (
224+ [sys .executable , str (script_path )],
225+ capture_output = True ,
226+ text = True ,
227+ check = True ,
228+ )
229+ with open ("docs.json" , "w" ) as f :
230+ f .write (result .stdout )
231+ print ("Generated docs.json successfully" )
232+
233+
216234def tox ():
217235 """Run tox for isolated testing."""
218236 print ("Running tox..." )
@@ -313,6 +331,7 @@ def main():
313331 print (" test-integration - Run integration tests" )
314332 print (" test-all - Run all tests (unit + integration)" )
315333 print (" docs - Build documentation" )
334+ print (" docs-json - Generate docs.json for documentation site" )
316335 print (" tox - Run tox for isolated testing" )
317336 print (" clean - Clean build artifacts" )
318337 print (" pr - Run all PR preparation checks" )
@@ -337,6 +356,7 @@ def main():
337356 print (" test-integration - Run integration tests" )
338357 print (" test-all - Run all tests (unit + integration)" )
339358 print (" docs - Build documentation" )
359+ print (" docs-json - Generate docs.json for documentation site" )
340360 print (" tox - Run tox for isolated testing" )
341361 print (" clean - Clean build artifacts" )
342362 print (" pr - Run all PR preparation checks" )
@@ -358,6 +378,7 @@ def main():
358378 "test-integration" : test_integration ,
359379 "test-all" : test_all ,
360380 "docs" : docs ,
381+ "docs-json" : docs_json ,
361382 "tox" : tox ,
362383 "clean" : clean ,
363384 "pr" : pr ,
0 commit comments