Skip to content

feat: support for multi version docs#20

Open
anishbista60 wants to merge 1 commit into
kubevirtbmc:mainfrom
anishbista60:multi-version-docs
Open

feat: support for multi version docs#20
anishbista60 wants to merge 1 commit into
kubevirtbmc:mainfrom
anishbista60:multi-version-docs

Conversation

@anishbista60

Copy link
Copy Markdown
Member

Docs Versioning Workflow

Day-to-day (no release needed)

Every PR merged to main triggers .github/workflows/deploy-docs.yml, which runs:

mike deploy --push --update-aliases dev

This rebuilds and pushes the dev version to the gh-pages branch, live at docs.kubevirtbmc.io/dev/.

✅ This is what unblocks you — merge freely, no release needed.

Cutting a docs release ("stable")

When you want the public/default docs to reflect a new KubeVirtBMC release:

  1. Make sure main has the docs content you want to snapshot (already merged via normal PRs).
  2. Tag it, matching the release version:
    git tag v0.9.0
    git push origin v0.9.0
    
  3. Pushing that tag triggers the same workflow, but the tag-matching step runs instead:
    mike deploy --push --update-aliases v0.9.0 stable
    mike set-default --push stable
    
    This builds a new version named v0.9.0, aliases it stable, pushes it to gh-pages, and sets it as the default (root /) version.

Result: docs.kubevirtbmc.io/ (and /stable/) serves v0.9.0, while docs.kubevirtbmc.io/dev/ keeps rolling forward with whatever's merged to main next. Old version snapshots (v0.8.1, etc.) stay published too — mike never deletes prior versions unless you run mike delete.

⚠️ One-time setup still needed before this works in production

GitHub Pages for kubevirtbmc/docs is presumably configured to deploy via the Actions artifact method (deploy-pages/upload-pages-artifact), which we removed. Since mike pushes content directly to the gh-pages branch instead, someone with admin rights on the repo needs to change:

Settings → Pages → Build and deployment → Source → "Deploy from a branch" → branch gh-pages, folder / (root)

Until that's changed, the workflow will push commits to gh-pages successfully, but GitHub Pages won't serve them.

@anishbista60

Copy link
Copy Markdown
Member Author
Screenshot From 2026-07-08 11-05-21

@anishbista60
anishbista60 requested a review from starbops July 8, 2026 05:37

@starbops starbops left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean we'd need to create a new tag in kubevirtbmc/docs? I was hoping we could avoid that release overhead. Instead, I'd prefer the documentation site to serve versioned docs from long-lived branches, with one branch per minor release. That said, if Zensical doesn't make this easy to implement, I'm fine with sticking to the current approach.

@anishbista60

Copy link
Copy Markdown
Member Author

Does this mean we'd need to create a new tag in kubevirtbmc/docs? I was hoping we could avoid that release overhead. Instead, I'd prefer the documentation site to serve versioned docs from long-lived branches, with one branch per minor release. That said, if Zensical doesn't make this easy to implement, I'm fine with sticking to the current approach.

Yes, we need to create new tag.

But I think long-lived branches approach reduces burden. Let me explore that part and get back here.

Thanks

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.

2 participants