fix: versioned docs builds no longer replace the main site#4
Merged
Conversation
The workflow had a critical bug: versioned builds ran `npx docusaurus docs:version`, built a full site, and deployed it to the site root, replacing the latest documentation. Now versioned builds use build-archived-version.sh which creates a standalone site at docs/<version>/ with its own baseUrl and archived banner, preserving the main site. Changes: - Split workflow into latest-only and versioned-only step paths - Versioned builds: run build-archived-version.sh, update versionsArchived.json, commit docs/<version>/ only - Latest builds: unchanged behavior (build + deploy to docs/ root) - Remove versioned_docs/ and versioned_sidebars/ (broken artifacts) - Reset versions.json to [] (Docusaurus versioning is not used) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.
Summary
build-archived-version.shto create standalone sites atdocs/<version>/instead of runningnpx docusaurus docs:versionand deploying a full site to the root, which was replacing the main/latest documentation.ifconditions: latest builds (unchanged) deploy todocs/root; versioned builds add onlydocs/<version>/andversionsArchived.json.versioned_docs/(~4000 files),versioned_sidebars/(11 files), and resetversions.jsonto[]— all artifacts of the broken Docusaurus versioning approach.Test plan
version: v0.7.0and verifyhttps://ogx-ai.github.io/still shows latest main branch docshttps://ogx-ai.github.io/v0.7.0/shows archived docs with announcement bannerhttps://ogx-ai.github.io/versionslists v0.7.0