Skip to content

fix: versioned docs builds no longer replace the main site#4

Merged
leseb merged 1 commit into
mainfrom
leseb/fix-versioned-deploy
Apr 29, 2026
Merged

fix: versioned docs builds no longer replace the main site#4
leseb merged 1 commit into
mainfrom
leseb/fix-versioned-deploy

Conversation

@leseb
Copy link
Copy Markdown
Contributor

@leseb leseb commented Apr 29, 2026

Summary

  • Versioned builds now use build-archived-version.sh to create standalone sites at docs/<version>/ instead of running npx docusaurus docs:version and deploying a full site to the root, which was replacing the main/latest documentation.
  • Workflow split into two clear paths with if conditions: latest builds (unchanged) deploy to docs/ root; versioned builds add only docs/<version>/ and versionsArchived.json.
  • Removed versioned_docs/ (~4000 files), versioned_sidebars/ (11 files), and reset versions.json to [] — all artifacts of the broken Docusaurus versioning approach.

Test plan

  • Trigger manual workflow dispatch with version: v0.7.0 and verify https://ogx-ai.github.io/ still shows latest main branch docs
  • Verify https://ogx-ai.github.io/v0.7.0/ shows archived docs with announcement banner
  • Verify https://ogx-ai.github.io/versions lists v0.7.0
  • Trigger a latest build and confirm site deploys normally

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>
@leseb leseb merged commit 7c8af25 into main Apr 29, 2026
1 check passed
@leseb leseb deleted the leseb/fix-versioned-deploy branch April 29, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant