sphinx-contrib/multiversion

Register callback to run sphinx-apidoc on every branch/tag?

Opened this issue · 4 comments

Hi. Thanks for your great work on sphinx-multiversion.
I have a API documentation generated using sphinx-apidoc and sphinx-build.
I would like to generate a versioned api documentation using sphinx-multiversion in a CI environment with Jenkins.
If possible, I would like to avoid committing/pushing the output of sphinx-apidoc onto the respective branch.

My question is the following: is it possible to tell sphinx-multiversion to run sphinx-apidoc after sphinx-multiversion has checked-out the respective branch, so that sphinx-multiversion can use the rst files generated by sphinx-apidoc.
Thanks in advance for your help.

PR #62 may solve this issue

You can use this to get this working: https://pypi.org/project/sphinxcontrib-apidoc/ - it automatically runs the configured apidoc stuff on any sphinx build, including each version build.

Can anyone guide me how to use sphinx-multiversion with sphinx-apidoc

Currently I use the commands below with sphinx-apidoc, but I do not know how to link sphinx-multiversion:

sphinx-apidoc -F --implicit-namespaces -P -o ./doc ./<namespace> ./setup.py
./doc/make.bat clean
./doc/make.bat html

@fritz-hh , any advice?

Duplicate of #45