fix(docfx): remove redundant standalone cleanup step#100
Closed
Chris-Wolfgang wants to merge 4 commits into
Closed
fix(docfx): remove redundant standalone cleanup step#100Chris-Wolfgang wants to merge 4 commits into
Chris-Wolfgang wants to merge 4 commits into
Conversation
Mirrors repo-template#342 — same fix into IEnumerable-Extensions's docfx.yaml. The standalone 'Clean up stale root files from gh-pages' step did identical cleanup logic to what the deploy step already performs in its own worktree, just in a separate commit + push. Removing it gives: - One commit + push per release (not two) - Half the pages-build-deployment rebuilds - Atomic deploy (no partial-cleanup window) - ~60 fewer lines of YAML Caught by Copilot review on PR #95. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Removes a redundant gh-pages “stale root cleanup” step from the DocFX deployment workflow, relying on the existing cleanup that already occurs inside the single-commit deploy step to avoid double commits / double Pages rebuilds and reduce the risk of a partial-cleanup state.
Changes:
- Deleted the standalone “Clean up stale root files from gh-pages” step.
- Kept root cleanup behavior consolidated within the “Deploy docs to GitHub Pages” step (single worktree/repo state, single push).
Owner
Author
|
Superseded by the C1 template-drift re-sync. The canonical |
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.
Summary
Mirrors repo-template#342. Removes the standalone "Clean up stale root files from gh-pages" step in
docfx.yamlbecause the deploy step already does identical cleanup in its own worktree.Why
On every release with
deploy_as_latest=true, gh-pages was receiving two commits + two Pages rebuilds:chore: clean up stale root DocFX assets before redeploy [skip ci](standalone cleanup)docs: deploy <version> and update latest(deploy step — also re-cleaned in its fresh worktree)The deploy step already does the exact same
Get-ChildItem | Where-Object | Remove-Itemcleanup at lines 360-363 ofdocfx.yaml(well, those line numbers were before this PR — the cleanup is now closer to the top of the deploy step). The standalone step's cleanup commit was redundant duplication, and its only meaningful behavior was to expose a partial-cleanup window — if the deploy failed after the standalone step pushed, gh-pages was stuck in cleaned-but-no-fresh-content state.Impact
pages-build-deploymentrebuildsWhy now
Caught by Copilot review on PR #95 (lines 234, 282 — both call sites of the cleanup-push). Fix lands locally rather than waiting for a template-sync wave so IEnumerable doesn't carry the redundancy between now and then.
Note about the protected-files guard
Touches
.github/workflows/docfx.yamlso theDetect .NET Projectsguard will fail it. Maintainer override required.Test plan