ammaraskar / sphinx-action

Github action that builds docs using sphinx and places errors inline
Apache License 2.0
189 stars 114 forks source link

Fail build for sphinx error (and warning) #24

Open tdegeus opened 3 years ago

tdegeus commented 3 years ago

Thanks for the nice action! I was wondering though, can I also fail my build on sphinx errors and warnings?

ammaraskar commented 3 years ago

Sorry for the late reply Tom, but you should be able to use the Sphinx option:

-W Turn warnings into errors. This means that the build stops at the first warning and sphinx-build exits with exit status 1.

Follow the example in the advanced usage section and use a custom build command like

build-command: "sphinx-build -W -b html . _build"