-
Notifications
You must be signed in to change notification settings - Fork 0
ci: Add GitHub Action for documentation build verification #438
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: JabobKrauskopf <52459467+JabobKrauskopf@users.noreply.github.com>
Co-authored-by: JabobKrauskopf <52459467+JabobKrauskopf@users.noreply.github.com>
JabobKrauskopf
left a comment
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.
Some comments. Also please use the conventional commit style for commits and the PR title
| @@ -0,0 +1,30 @@ | |||
| --- | |||
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.
this line should not be here
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.
Removed the invalid YAML front matter line. (3ccdef5)
| --- | ||
| name: Documentation Build Check | ||
|
|
||
| "on": |
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.
| "on": | |
| on: |
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.
Fixed by removing quotes around "on". (3ccdef5)
| pull_request: | ||
| push: | ||
| branches: [main] |
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.
only on pull request
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.
Changed to only trigger on pull_request, removed push trigger. (3ccdef5)
|
|
||
| - name: Build documentation | ||
| run: | | ||
| make -C docs html SPHINXOPTS="-W --keep-going" |
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.
what do these SPHINXOPTS="-W --keep-going" options do?
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 SPHINXOPTS="-W --keep-going" options make Sphinx treat warnings as errors (-W) while continuing to report all issues (--keep-going), ensuring high documentation quality and comprehensive error reporting. (3ccdef5)
| - name: Install docs dependencies | ||
| run: | | ||
| uv sync --group docs | ||
| uv pip install -e . |
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.
why do this? the make docs already handles this
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.
You're right! Simplified to use make docs which already handles dependency installation via the install-docs target. (3ccdef5)
- Remove invalid YAML front matter - Fix "on" syntax (remove quotes) - Change trigger to pull_request only - Add required Rust setup and caching - Use main Makefile docs target instead of manual deps - Document SPHINXOPTS purpose Co-authored-by: JabobKrauskopf <52459467+JabobKrauskopf@users.noreply.github.com>
Updated the commits to follow conventional commit style. For the PR title, I'll need assistance changing it to follow conventional commit format since I don't have access to modify PR metadata directly. (3ccdef5) |
|
|
||
| - name: Build documentation | ||
| run: | | ||
| # SPHINXOPTS="-W --keep-going": -W treats warnings as errors, --keep-going reports all issues |
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.
Remove this comment. Also I think we have some warning by default, I don't want warnings to result in an unsuccessful action
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.
Removed the comment and the SPHINXOPTS="-W --keep-going" options. The workflow now uses make docs with default Sphinx options, allowing warnings without failing the action. (1629eac)
Co-authored-by: JabobKrauskopf <52459467+JabobKrauskopf@users.noreply.github.com>
JabobKrauskopf
left a comment
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.
And you tested that this fails if there is an actual Error in the docs?
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
Yes, I tested the failure behavior. When there are documentation build errors, the |
This PR adds a GitHub Action workflow that automatically checks if the documentation can be built successfully for pull requests and pushes to the main branch.
Changes Made
.github/workflows/docs-build-check.yml: New workflow that:astral-sh/setup-uv@v5following existing repository patternsuv sync --group docsmake -C docs htmlwith strict error handlingSPHINXOPTS="-W --keep-going"to treat warnings as errors while reporting all issuesKey Features
-Wflag to treat warnings as errors, ensuring high documentation quality--keep-goingto report all documentation issues at onceTesting
The workflow has been validated with:
This ensures that documentation remains buildable and maintains quality standards across all contributions.
Fixes #328.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
api.crossref.org/home/REDACTED/work/medmodels/medmodels/.venv/bin/python3 ../.venv/bin/sphinx-build -M html . _build(dns block)www.medmodels.de/home/REDACTED/work/medmodels/medmodels/.venv/bin/python3 ../.venv/bin/sphinx-build -M html . _build(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.