D8 canonical refresh: inline root-redirect HTML, drop template file#169
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the DocFX GitHub Pages deployment workflows to match a newer “canonical” pattern: generating the gh-pages root index.html inline (as a meta-refresh redirect to versions/latest/) and removing the standalone HTML template file previously used for the root landing page.
Changes:
- Inline generation of a redirect-only root
index.htmlin both DocFX deploy workflows, removing reliance on.github/version-picker-template.html. - Add a pre-build “overlay canonical docs assets from origin/main” option (docfx.yaml) plus additional deploy robustness (versions.json preservation guard, clearer git error handling, and safer root cleanup behavior).
- Delete
.github/version-picker-template.html.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/docfx.yaml | Adds optional canonical-asset overlay + versions.json preservation guard; switches gh-pages root index generation to inline redirect HTML. |
| .github/workflows/build-all-versions.yaml | Switches root index generation to inline redirect HTML; improves versions.json generation to omit tags that weren’t built; updates gh-pages action pin. |
| .github/version-picker-template.html | Removed (no longer referenced). |
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
Adopts the new canonical pattern (proven on D20-Dice
b58861a, landed onrepo-template/mainvia PR #408) for the gh-pages root landing page.Changes (4 files)
.github/workflows/docfx.yaml— synced from canonical. The root index.html is now built inline as a PowerShell string-array inside theDeploy docs to GitHub Pagesstep (no moreGet-Contentof a template file + regex-replacesubstitution). Only the page title is dynamic; the in-page version picker (public/version-picker.js) handles version switching from any docs page, so the root no longer needs a clickable list..github/workflows/build-all-versions.yaml— same inline-HTML refactor on the parallelGenerate root index.htmlstep..github/version-picker-template.html— DELETED. No workflow step references it anymore.docs/DOCFX-VERSION-PICKER.md— updated section 4, the gh-pages flow diagram, and the troubleshooting table to point at the new step names + log lines.Why
The template-file indirection was pure overhead — the only dynamic piece was the page title (the repo name). Inlining the HTML in the workflow makes what gets produced visible at the call site and removes a file from every repo.
Bypass needed
Touches protected paths (
.github/workflows/*.yaml,.github/version-picker-template.html), so theDetect .NET Projectsguard will fail. Admin-bypass merge.