ci: validate docs build on pull requests#191
Closed
framsouza wants to merge 1 commit intomistralai:mainfrom
Closed
ci: validate docs build on pull requests#191framsouza wants to merge 1 commit intomistralai:mainfrom
framsouza wants to merge 1 commit intomistralai:mainfrom
Conversation
docs.yaml only triggered on push to main, meaning a PR could break the documentation build and nobody would find out until after it merged. Split the workflow into two jobs: deploy_docs runs on push to main and publishes to GitHub Pages as before, build_docs runs on PRs and builds with --strict to catch errors early. Also renamed the workflow from 'Mistral Common CI' to 'Mistral Common Docs' to avoid duplicate names in the Actions tab, and replaced the manual actions/cache block with setup-uv's built-in caching to be consistent with lint_build_test.yaml.
Contributor
|
This is a needed fix — catching doc build failures before they reach main is important. The separation of Also appreciate the switch from manual +1 for merging. |
Contributor
|
It is actually handled by the other ci tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs.yamlonly ran on push tomain, so broken docs weren't caught until after a PR was already merged, with this change the documentation errors are now caught before merge instead of after.I split the single job into two:
deploy_docs: runs on push tomainonly, deploys to GitHub Pages as before. No behavior change here.build_docs: runs on pull requests, builds with--strictto catch errors without deploying anything. Skips draft PRs.Also replaced the manual
actions/cacheblock withsetup-uv's built-in caching to be consistent with howlint_build_test.yamlhandles it after #190.Testing
Tested the docs build with uv.
test output
``` uv sync --all-extras --group docs uv pip install -e . --no-deps uv run mkdocs build --strict Resolved 118 packages in 27ms Audited 115 packages in 36ms Resolved 1 package in 8ms Built mistral-common @ file:///Users/framsouza-personal/mistral-common Prepared 1 package in 590ms Uninstalled 1 package in 0.95ms Installed 1 package in 2ms ~ mistral-common==1.9.1 (from file:///Users/framsouza-personal/mistral-common) INFO - Cleaning site directory INFO - Building documentation to directory: /Users/framsouza-personal/mistral-common/site INFO - Doc file 'usage/requests.md' contains a link '#transcription-request', but there is no such anchor on this page. INFO - Documentation built in 2.31 seconds ```