ci: validate docs on PR and only deploy Pages on release#570
Merged
Conversation
added 2 commits
July 11, 2026 12:10
- build-docs.yml: add a pull_request trigger (and keep push to main, for parity) that runs a new 'validate' job — a strict mkdocs build to catch broken internal links/anchors/nav entries, plus lychee to catch dead external links. Never deploys. - Gate the 'deploy' job to release: published (or a manual dispatch against a release tag), matching the build-library.yml/build-template.yml convention, instead of deploying on every push to main. - Move the Pages-specific permissions/concurrency group and the configure-pages step to the 'deploy' job only, so PR/push validation runs are unaffected and don't need pages:write. - Fix the broken links/anchors surfaced by the new checks: a stale self-referential anchor link, two dead GitHub file/profile links, a removed test-only MySQL doc link, a moved Azure Cosmos DB for MongoDB doc URL, an old Auth0 quickstart URL, and a URL missing a '/'. Closes CommunityToolkit#562
… IPs) The live pull_request run on PR CommunityToolkit#570 showed dotnet.microsoft.com returning 403 to the GitHub-hosted runner (same class of CDN/WAF bot-blocking as the already-excluded dev.mysql.com and developers.facebook.com); the link is live (302) from a normal client.
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.
Closes #562
Summary
build-docs.ymlhad no PR validation and republished the live GitHub Pagessite on every merge to
main, per #562.pull_requesttrigger (and keeppush: main, for parity) that runsa new
validatejob:mkdocs build --strict -f ./mkdocs.production.ymlto catch brokeninternal links/anchors/nav entries.
lycheeverse/lychee-actionto catch dead external links in
docs/**/*.md.deployjob torelease: published(or a manualworkflow_dispatchagainst a release tag), matching thebuild-library.yml/build-template.ymlconvention, instead of deployingon every push to
main.--strictis only used in the new CI-onlyvalidatejob — not baked intomkdocs.production.ymlor used by thebuildjob that feedsdeploy— soa stray warning can never block the artifact that actually gets published.
pages: write,id-token: write),the
pagesconcurrency group, and theconfigure-pagesstep down to thedeployjob only, so PR/push validation runs stay fork-PR-safe and don'tneed elevated Pages permissions.
attribution text, dropped the dead hyperlink).
tests/infra/databases/cosmos.bicep)that no longer exists; repointed to the equivalent bicep module in the
Cosmos DB sample.
the page already notes MySQL is no longer tested as of v10.0.0).
/(learn.microsoft.comaspnet/...).Verification
mkdocs build --strict -f ./mkdocs.production.yml— clean.mkdocs build -f ./mkdocs.yml(local dev config, unaffected by thestrict-mode change) — clean.
lycheeagainstdocs/**/*.md(with a browser-like user agent to avoidbot-blocking false positives on a couple of hosts) — 0 errors.
actionlinton.github/workflows/build-docs.yml— clean.src/**,tests/**,templates/**, orsamples/**paths changed, sonone of
build-library.yml/build-template.yml/build-samples.ymlapply.
build-docs.ymlitself was intentionally not dispatched on thefork ahead of this PR, since its current
deployjob is unguarded — thefix will get its first live validation from this PR's own
pull_request-triggered run.