-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #2418: Building docs should be a part of the CI. #2431
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution. I have two comments that should be addressed before merging this change.
- uses: ammaraskar/sphinx-action@master | ||
with: | ||
pre-build-command: "pip install Sphinx==4.2.0 recommonmark==0.7.1" | ||
docs-folder: "docs/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current setup would not treat warnings as errors, most of the problems with our docs building in the past were in most cases informed as warnings, but they were ignored, eg. missing entry in the index. We should add "-W" option to enable fatal warnings, --keep-going
to not stop after the first warning and optionally -n
which would try to check for missing references
docs-folder: "docs/" | |
build-command: 'make html SPHINXOPTS="-W --keep-going -n"' | |
docs-folder: "docs/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Before raising pull request, I thoroughly checked for all the options to make warning as error.
I have checked on adding -W
but it does not work.
To solve it I had already raised issue.
Even with one issue resolved, we can enable warning as error.
I also looked into catching warning
as they bubble as Github warning, but i dont see any reference of any such workflow commands
If you find any resources/approach, please share. I will implement it.
Any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ankusharya I think that maybe problems with log files might be also a problem with running with act. We should check if it behaves the same in GH Actions environments in the same way. I don't have a large experience with this tool, but even then I came to corner cases where build was failing locally with act and worked well in the CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like -W
didn't work with sphinx-action
(action will fail with /tmp/sphinx-log
couldn't find) when we use make
to invoke sphinx
. In this case the SPHINXOPTS
collapses between our SPHINXOPTS
and internal SPHINXOPTS
.
in env=dict(os.environ, SPHINXOPTS=sphinx_options),
the sphinx_options
will be ignored.
https://github.com/ammaraskar/sphinx-action/blob/e781e9af3e80bfe0ea539e4ea46858d51e027214/sphinx_action/action.py#L114-L123
To workaround this, we can build sphinx by sphinx-build
instead of make
.
…fy sbt.rst warning issue
Completely agree. Miss on my part Co-authored-by: Wojciech Mazur <wojciech.mazur95@gmail.com>
FYI @ankusharya @WojciechMazur |
* Fix #2418: Building docs should be a part of the CI. Modify sbt.rst warning issue * Make sphinx-build fails if there's warning * Install in pre-build-command Co-authored-by: Wojciech Mazur <wojciech.mazur95@gmail.com> Co-authored-by: Rikito Taniguchi <rikiriki1238@gmail.com> (cherry picked from commit ea27479)
* Fix #2418: Building docs should be a part of the CI. Modify sbt.rst warning issue * Make sphinx-build fails if there's warning * Install in pre-build-command Co-authored-by: Wojciech Mazur <wojciech.mazur95@gmail.com> Co-authored-by: Rikito Taniguchi <rikiriki1238@gmail.com> (cherry picked from commit ea27479)
In this commit:
build-docs
docs/user/sbt.rst
to remove the warningExplanation about
build-docs
action4.2.0
build-docs
is tested locally by nektos/act