fix: skip Pages deploy for archived version builds#13
Merged
Conversation
Archived version builds only commit static HTML under docs/vX.Y.Z/ but the main Docusaurus site files are not in git. When Pages deployed the docs/ directory after an archived build, it served only the archived subdirectories with no index.html at the root, causing a 404. Skip the Pages deploy step for archived builds and instead trigger a full latest rebuild via repository_dispatch, which includes both the main site and all archived version directories. Signed-off-by: Sébastien Han <seb@redhat.com>
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.
What does this PR do?
Fixes the 404 on the main site caused by archived version builds deploying an incomplete
docs/directory to GitHub Pages.Root cause: The main Docusaurus site is built during "latest" builds and copied into the workflow's
docs/directory, but never committed to git. When an archived version build runs, it commitsdocs/vX.Y.Z/and then deploys the entiredocs/directory to Pages — which only contains archived subdirectories and noindex.htmlat the root.Fix: Skip the Pages deploy for archived builds. After committing the archived version, trigger a
docs-updaterepository dispatch which performs a full latest rebuild — this includes both the main site and all archived versions in a single deployment.Test Plan
docs-version-deploydispatch for any version (e.g. v0.7.0)deployjob is skipped andrebuild-latesttriggers a newdocs-updaterunhttps://ogx-ai.github.io/loads without 404