Skip to content

Comments

Flip docs default to released + support doc-only releases#177

Open
clavery wants to merge 6 commits intomainfrom
flip-docs-default-to-released
Open

Flip docs default to released + support doc-only releases#177
clavery wants to merge 6 commits intomainfrom
flip-docs-default-to-released

Conversation

@clavery
Copy link
Collaborator

@clavery clavery commented Feb 20, 2026

Summary

  • Flip docs URL structure: stable/released docs now live at the root URL, dev docs move to /dev/ (previously dev was at root, released at /release/)
  • Add @salesforce/b2c-dx-docs workspace package to enable doc-only releases and changelog tracking
  • Update CI workflows for flipped build order, docs tagging, and deployment triggers
  • Add docs build to CI to catch broken docs builds before merge

Why a docs workspace package?

Adding a private @salesforce/b2c-dx-docs package to the monorepo with a dependency on @salesforce/b2c-tooling-sdk gives us three benefits via the existing changeset infrastructure:

  1. Doc-only releases — Documentation improvements can be released independently by creating a changeset that only bumps @salesforce/b2c-dx-docs. This creates a docs@<version> tag and triggers a docs rebuild without touching CLI/SDK/MCP versions.

  2. Automatic cascade on SDK changes — Because the docs package depends on the SDK, the updateInternalDependencies: "patch" setting in changeset config auto-bumps the docs version whenever the SDK is bumped. This is correct behavior since API docs are generated from the SDK and should be rebuilt when it changes.

  3. Changelog tracking — Doc changes get their own CHANGELOG.md and appear in GitHub release notes, providing visibility into what changed in the documentation.

Release cascade behavior:

  • SDK changeset → SDK bumps → CLI, MCP, Docs all auto-patch → docs tag created → docs rebuilt
  • CLI-only changeset → CLI bumps → no cascade to docs (CLI changes don't affect docs build)
  • Docs-only changeset → Docs bumps → no cascade to others → docs tag created → docs rebuilt

Changes

File Change
docs/package.json New private workspace package
pnpm-workspace.yaml Add docs to workspace packages
docs/.vitepress/config.mts Flip IS_RELEASE_BUILDIS_DEV_BUILD, stable at root, dev at /dev/
.github/workflows/deploy-docs.yml Flip build order, dual-match tag resolution (@salesforce/* + docs@*), cancel-in-progress: true
.github/workflows/publish.yml Docs version detection, docs@<version> tag creation, changelog extraction, deploy trigger
.github/workflows/ci.yml Add docs build step after package builds

Test plan

  • pnpm install succeeds with new docs workspace
  • pnpm -r run build skips docs package (no build script)
  • pnpm run docs:build (default) produces root-path stable docs
  • IS_DEV_BUILD=true pnpm run docs:build produces /dev/ base path
  • pnpm run lint:agent passes
  • pnpm run typecheck:agent passes
  • Verify deploy-docs workflow on merge
  • Test doc-only changeset with pnpm changeset version

Add a private @salesforce/b2c-dx-docs workspace package to enable:

- Doc-only releases via changesets without bumping CLI/SDK/MCP versions
- Automatic docs rebuild when SDK changes (via updateInternalDependencies cascade)
- Changelog tracking for documentation changes

Flip the docs deployment so released/stable docs are served at the root
URL and dev docs live at /dev/. Previously dev was at root and released
docs were at /release/.

Update deploy-docs workflow to build stable docs at root from the latest
tag (matching both @salesforce/* and docs@* patterns) and nest dev docs
under /dev/. Update publish workflow to create docs@<version> tags and
trigger docs deployment on stable releases.
Document the docs workspace package in the monorepo package listing,
Documentation section (build modes, URL structure, doc-only releases,
SDK cascade), and Changesets section.
Runs on PRs that touch docs/ or SDK source (which affects TypeDoc API
docs generation). Catches broken docs builds before merge.
Add a docs build step to ci.yml after package builds instead of a
separate docs-ci workflow. Reuses the existing checkout, install, and
build steps — more efficient than spinning up a separate runner.
Move vitepress, typedoc, and typedoc plugins from root devDependencies
into docs/package.json. Move typedoc.json into docs/ with adjusted
relative paths. Root package.json scripts now proxy to the docs package
via pnpm --filter.
@github-actions github-actions bot added the needs-3pl-review PR introduces net-new third-party dependencies and needs discussion label Feb 20, 2026
Add explicit list of valid changeset packages to AGENTS.md and note
doc-only changeset guidance. Set docs package version to 0.1.0 to
align with the pre-GA versioning of the other packages.
@clavery clavery added 3pl-approved Maintainer approved net-new third-party dependency additions and removed needs-3pl-review PR introduces net-new third-party dependencies and needs discussion labels Feb 20, 2026
@github-actions github-actions bot added needs-3pl-review PR introduces net-new third-party dependencies and needs discussion and removed needs-3pl-review PR introduces net-new third-party dependencies and needs discussion labels Feb 20, 2026
Copy link
Contributor

@patricksullivansf patricksullivansf left a comment

Choose a reason for hiding this comment

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

conceptually this makes sense.

I'm a little confused about how often the dev docs get built by CI

@clavery
Copy link
Collaborator Author

clavery commented Feb 20, 2026

They are built on every change to main. This changes it so the website starts on the last released version instead of the version of the docs from main. You can toggle with a dropdown in the header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3pl-approved Maintainer approved net-new third-party dependency additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants