Skip to content

Conversation

@marc0olo
Copy link
Member

@marc0olo marc0olo commented Jan 30, 2026

Summary

This PR implements versioned documentation deployment with manual control over docs branch creation. Documentation can be deployed from specific release branches, allowing us to maintain docs for multiple versions while keeping full control over the process.

What's New

Manual Docs Branch Creation

  • New workflow: release-docs-branch.yml for creating docs branches on-demand
  • Fully manual via workflow_dispatch (Actions UI)
  • Choose branch naming strategy:
    • major-minor: v0.1.0 → v0.1-docs (default, reused for patches)
    • full-version: v0.1.0 → v0.1.0-docs
  • Prevents accidental overwrites of existing branches

Controlled Docs Deployment

  • Docs workflow deploys from v*-docs branches to GitHub Pages
  • Only deploys when branch matches the ACTIVE_DOCS_BRANCH repository variable
  • Supports manual triggering via workflow_dispatch
  • Validates docs compilation on PRs

Version Badge

  • Displays current version from Cargo.toml in docs header
  • Updates automatically on each release branch
  • Styled with good contrast for light and dark modes

Updated Banner

  • Refreshed feedback banner with links to GitHub Issues, Forum, and Discord
  • Removed outdated "latest main branch" message

How to Use

Creating a Docs Branch

  1. Go to ActionsRelease Docs Branch
  2. Enter release version (e.g., v0.1.0, v0.2.0)
  3. Choose branch strategy (major-minor or full-version)
  4. Click Run workflow

Deploying Docs

  1. Set the active branch: Create repository variable ACTIVE_DOCS_BRANCH
    • Go to Settings → Actions → Variables
    • Example value: v0.1-docs
  2. Trigger deployment:
    • Push to the docs branch, or
    • Manually trigger the docs workflow

Examples

Major-Minor Strategy (Default):

  • Release v0.1.0 → Creates v0.1-docs
  • Release v0.1.1 → Reuses existing v0.1-docs (manual workflow will warn)
  • Release v0.2.0 → Creates v0.2-docs
  • Set ACTIVE_DOCS_BRANCH=v0.1-docs → Docs deploy from v0.1-docs

Full-Version Strategy:

  • Release v0.1.0 → Creates v0.1.0-docs
  • Release v0.2.0 → Creates v0.2.0-docs
  • Set ACTIVE_DOCS_BRANCH=v0.1.0-docs → Docs deploy from that branch

Design Decisions

  • Manual workflow: Follows pattern from PR feat: publish via npm #320 (npm releases)
  • Separate from release.yml: Doesn't modify cargo-dist's release workflow
  • Full control: Prevents accidental docs branch creation/updates
  • Flexible naming: Supports both major.minor and full version strategies

@marc0olo marc0olo requested a review from a team as a code owner January 30, 2026 16:32
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