Repository navigation
[docs-site] Skip PR staging previews for non-site file changes - #4321
Merged
Merged
Conversation
The Pages Deploy workflow builds a full ~470 MB staging preview (DocFX +
3 WASM apps) for every PR, with no path filter. Recent open PRs were mostly
tests/native/CI/benchmark changes that cannot alter the rendered site, yet
each still produced a preview — the previews accumulated to 5.6 GB and pushed
the aggregate Pages artifact over the 1 GB limit, breaking the Go Live deploy.
Add a conservative paths-ignore EXCLUDE to the pull_request trigger. It is
fail-safe: the full build still runs unless EVERY changed file matches the
list, so anything not anticipated still gets a preview. Only paths verified to
never feed any site output are excluded:
- tests/**, benchmarks/** (not built for the site)
- documentation/dev/** (not in the docfx content root)
- native/<non-wasm platforms>/** (galleries are WASM only; WASM native
comes from native/wasm + externals/skia)
- repo meta docs (README, CONTRIBUTING, CODE_OF_CONDUCT, SECURITY)
- .agents/**, cgmanifest.json
Pushes to main are intentionally NOT filtered, so the live site always
redeploys. binding/**, source/**, samples/**, documentation/{docfx,site}/**,
native/wasm/**, scripts/infra/native/{wasm,shared}/** and externals/skia are
NOT excluded, so anything that can change /docs/, the release notes, /ai/, or
the gallery/fiddle apps still builds a preview.
Co-authored-by: Copilot <[email protected]>
Contributor
📦 Try the packages from this PRWarning Do not run these scripts without first reviewing the code in this PR. Step 1 — Download the packages bash / macOS / Linux: curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4321PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4321"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4321/packages --name skiasharp-pr-4321More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4321 |
Contributor
|
📖 Documentation Preview The documentation for this PR has been deployed and is available at: 🔗 View Staging Site This preview will be updated automatically when you push new commits to this PR. This comment is automatically updated by the documentation staging workflow. |
mattleibow
pushed a commit
that referenced
this pull request
Jul 3, 2026
Brings in the 7 commits that landed on main after this sync branch was originally cut (yesterday's automated main-tip run): - e00fa55 [skia-sync] Merge upstream chrome/m151 bug fixes (#4312) - a1ecb75 docs: regenerate API diffs and polish release notes (#4322) - 1c49b4a Remove unnecessary 'unsafe' modifier from GRContextOptions (#3991) - 2d15749 Update docs submodule to latest main (#4304) - 7356c75 [docs-site] Skip PR staging previews for non-site file changes (#4321) - a95cc35 [docs-site] Add 'Moving faster with AI' dashboard to the AI page (#4318) - 72ce599 [infra] Remove obsolete skiasharp-docker registry auth (#4310) Conflicts resolved: - cgmanifest.json: took origin/main (will be overwritten by update-versions.ps1 in the next commit with the new sync SHAs). - externals/skia: took ours (90a2d04943 is a descendant of 98877992a5 from PR #4312 via the corresponding submodule merge PR #278). - docs submodule pointer: took origin/main (b64a0266c from PR #4304). Co-authored-by: Copilot <[email protected]>
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.
Problem
The Pages - Deploy workflow builds a full ~470 MB staging preview (DocFX + 3 WASM apps) for every PR — there is no path filter. In practice most open PRs change
tests/,native/,scripts/,benchmarks/or.github/— none of which alter the rendered site — yet each still produced a preview. The previews accumulated to 5.6 GB on thedocs-livebranch and pushed the aggregate GitHub Pages artifact past the 1 GB limit, which broke thePages - Go Live!deploy (upload-size warning → timeout).I analysed the 11 staging previews that existed at the time: 0 of 11 touched rendered docs, release notes,
/ai/, or gallery samples; 4 of 11 changed nothing on the site at all.Change
Add a conservative
paths-ignoreexclude to thepull_requesttrigger. This is deliberately fail-safe —paths-ignoreskips the run only if EVERY changed file matches the list, so anything we did not anticipate still gets a full preview. We start with the exclude (not a positivepaths:allow-list) precisely so a missed path fails toward building, not toward skipping.Only paths verified to never feed any site output are excluded:
tests/**,benchmarks/**— not built for the sitedocumentation/dev/**— not in the DocFX content root (docfx.jsonrendersdocumentation/docfx/**only)native/*platforms (ios, macos, tvos, tizen, android, linux*, windows, winui*, maccatalyst, nanoserver) — the galleries are WASM only; the WASM native libs come fromnative/wasm/**,scripts/infra/native/{wasm,shared}/**andexternals/skiaREADME.md,CONTRIBUTING.md,CODE_OF_CONDUCT.md,SECURITY.md.agents/**,cgmanifest.jsonNot excluded (so they still build a preview):
documentation/docfx/**(incl. release notes),documentation/site/**(landing +/ai/),samples/**,binding/**,source/**,native/wasm/**,scripts/infra/native/{wasm,shared}/**,externals/skia, and.github/workflows/build-site.yml.push: mainis intentionally not filtered, so the live site always redeploys.Safety notes
Build Siteis not in branch protection (license/claandSkiaSharp (Public)are), so a skipped run cannot block a merge.Follow-ups (not in this PR)
scripts/**subtrees, other root metadata) once we are comfortable./docs/.