Repository navigation
ci: check the site before every deploy and publish only what passed - #1172
Merged
Merged
Conversation
The deploy used to build and publish in one step, so a build that lost every image (selectolax 1.0.1, 2026-10-19) went straight to the live wiki. Now ci.yml runs the PR checks first (Markdown, secrets, photo GPS), builds once, checks that build, and publishes that same folder with ghp-import (what `mkdocs gh-deploy --force` runs internally, same flags and commit message). If any check fails, nothing is published and the Discord alert fires. Each check is its own step so one failure doesn't hide the others. Two adversarial reviews found gaps, now closed: - pymdownx.snippets check_paths: a missing --8<-- include now fails the build instead of silently publishing half-empty pages. - check_links.py: compares each page's images with its Markdown (snippet includes expanded) and fails if a page loses all its images or the site has under 90% of the expected total; checks stylesheets, scripts, and menu links; checks every redirect in mkdocs.yml was generated. - The deploy also confirms CNAME is in the build. Tested: the current tree passes (681 pages, 3157 of 3143 expected images, 0 errors). Each of these fails: the selectolax 1.0.1 build, a 15% partial image loss, a missing stylesheet, menu page, or redirect target, and a missing snippet include. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 5
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merged
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.
Nothing broken gets published anymore. The deploy (
ci.yml) now runs the docs checks on the build it's about to publish, and publishes only if they all pass. A failure stops the deploy, leaves the live wiki as it was, and posts the existing Discord alert.Deploy steps (ci.yml)
mkdocs build -d site.check_links.pyon that build, plus a check thatCNAMEmade it into the build.ghp-import --no-jekyll --push --force. This is whatmkdocs gh-deploy --forceruns internally, with the same remote, branch and commit message ("Deployed with MkDocs version: …"). A simulation in a throwaway clone produced a gh-pages commit with.nojekyll,CNAMEandindex.html.Gaps closed after two adversarial reviews
pymdownx.snippetsgetscheck_paths: true. A reviewer showed that a missing include emptied 203 pages and the build still passed. Now the build fails and names the file.check_links.pycompares each page's images with its Markdown, with snippet includes expanded. It fails if a page loses all its images, or if the site has under 90% of the expected total. The old rule only fired after about 70% were gone.check_links.pynow checks these too, reporting each problem once.check_links.pychecks that every redirect inmkdocs.ymlproduced a page. A redirect with a missing target is silently skipped.Tests
Snippet at path … could not be foundNot changed (pre-existing)
The
mogrify -resize '750x>'step has never resized anything. The unquoted>is read by the shell as a redirect, so mogrify gets no file. Fixing the quoting would start shrinking published PNGs, so that belongs in its own PR.🤖 Generated with Claude Code