Skip to content

ci: continuous integration with draft content - #277

Open
Aryex wants to merge 3 commits into
mainfrom
aryex/trunk-based-deployment
Open

ci: continuous integration with draft content#277
Aryex wants to merge 3 commits into
mainfrom
aryex/trunk-based-deployment

Conversation

@Aryex

@Aryex Aryex commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements the new deployment model proposed in #276:

  • main becomes the single source of truth, replacing the mainpublic promotion flow.
  • Unreleased content is hidden by draft flags instead of long-lived branches.

Issue link

Closes #276

Content Changes

  • CONTRIBUTING.md — replaces the two-branch overview with the trunk-based deployment model: draft: true for unreleased pages, the <Draft> component for partial content, the two draft rules (no manual sidebar entries for draft pages; no links from published pages to draft pages), release-day process, and structural-change guidance.
  • src/content/docs/concepts/client-features/client-side-caching.mdx and src/content/docs/how-to/connections/resilience-best-practices.mdx — pending remark formatting applied (separate commit, no content changes).

Implementation

  • deploy.yml — push trigger and deploy-job guard changed from public to main.
  • ci-cd.yml, static-checks.yml, check-csharp-examples.ymlpublic removed from PR branch filters.
  • src/components/Draft.astro (new) — inline equivalent of Starlight's page-level draft: true: renders children only in dev mode ({import.meta.env.DEV && <slot />}), so wrapped content is excluded from production builds but reviewable in pnpm dev. Releasing content = deleting the wrapping tags.

ATTENTION ⚠️

Reviewers, please confirm the following commits are ready for deployment. merging this will cause a deployment immidiately.

Remaining manual steps after merge (repo admin):

Testing

  • pnpm build — 110 pages built, all internal links valid.
  • pnpm format — clean (formatting drift committed separately).
  • <Draft> component verified locally: wrapped content absent from production build HTML; rendered by the dev server.
  • Verified draft: true pages are excluded from production builds and drop out of autogenerated sidebar sections gracefully.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one issue.
  • Commit message has a detailed description of what changed and why.
  • All commits are signed off with --signoff flag.
  • pnpm build runs successfully.
  • Links have been checked for validity.
  • Destination branch is correct - main or release
  • Create merge commit if merging release branch into main, squash otherwise.

@Aryex
Aryex force-pushed the aryex/trunk-based-deployment branch 2 times, most recently from 314726b to 094b4c5 Compare July 24, 2026 21:30
@Aryex
Aryex marked this pull request as ready for review July 24, 2026 21:38
@Aryex Aryex changed the title ci: update deployment process to ci with draft. ci: continuous integration with draft content Jul 24, 2026
Comment thread CONTRIBUTING.md
Comment thread src/components/Draft.astro
Comment thread src/content/docs/how-to/connections/resilience-best-practices.mdx
@jeremyprime

Copy link
Copy Markdown
Collaborator

May want to update PR checklist with line item on draft usage.

@Aryex
Aryex requested a review from jeremyprime July 30, 2026 19:48
@Aryex

Aryex commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

After some discussions, we decided to go with a two branch approach instead, keeping the draft contents. See CONTRIBUTING.md for more details.

Aryex added 3 commits July 30, 2026 12:50
Signed-off-by: Alex Le <alex.le@improving.com>
Signed-off-by: Alex Le <alex.le@improving.com>
Signed-off-by: Alex Le <alex.le@improving.com>
@Aryex
Aryex force-pushed the aryex/trunk-based-deployment branch from 53f1b39 to 172a1a0 Compare July 30, 2026 19:50
Comment thread CONTRIBUTING.md
Comment on lines +26 to +29
```bash
git fetch origin
git push origin +origin/main:public
```

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Only specific maintainers are allowed force pushes to public. Force pushing are disabled in general.

Comment thread CONTRIBUTING.md

For urgent fixes to the live site that can't wait for the next release:

1. Open a PR targeting `public`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Or hotfixes always go to main and then open a PR from main to public. That avoids backporting and divergence between public and main.

Comment thread CONTRIBUTING.md

### Release Process

`main` is the source of truth. On release day, a maintainer resets `public` to `main`'s HEAD and force-pushes:

@jeremyprime jeremyprime Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Or just open a PR from main to public instead of force pushing. Merging should not cause any issues now that main and public are in sync, and it avoids the need for special push permissions. Force pushing can be an alternate option if main and public ever diverge.

@jeremyprime

Copy link
Copy Markdown
Collaborator

Warning in PR description is no longer applicable since those are going into main and will not go live right away. Instead the question is which open PRs need to tag pages or elements as draft to avoid going live until the underlying features are released.

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.

Proposal: Managing deployments with draft contents

2 participants