ci: continuous integration with draft content - #277
Conversation
314726b to
094b4c5
Compare
|
May want to update PR checklist with line item on draft usage. |
|
After some discussions, we decided to go with a two branch approach instead, keeping the draft contents. See |
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>
53f1b39 to
172a1a0
Compare
| ```bash | ||
| git fetch origin | ||
| git push origin +origin/main:public | ||
| ``` |
There was a problem hiding this comment.
Only specific maintainers are allowed force pushes to public. Force pushing are disabled in general.
|
|
||
| For urgent fixes to the live site that can't wait for the next release: | ||
|
|
||
| 1. Open a PR targeting `public`. |
There was a problem hiding this comment.
Or hotfixes always go to main and then open a PR from main to public. That avoids backporting and divergence between public and main.
|
|
||
| ### Release Process | ||
|
|
||
| `main` is the source of truth. On release day, a maintainer resets `public` to `main`'s HEAD and force-pushes: |
There was a problem hiding this comment.
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.
|
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. |
Summary
Implements the new deployment model proposed in #276:
mainbecomes the single source of truth, replacing themain→publicpromotion flow.Issue link
Closes #276
Content Changes
CONTRIBUTING.md— replaces the two-branch overview with the trunk-based deployment model:draft: truefor 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.mdxandsrc/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 frompublictomain.ci-cd.yml,static-checks.yml,check-csharp-examples.yml—publicremoved from PR branch filters.src/components/Draft.astro(new) — inline equivalent of Starlight's page-leveldraft: true: renders children only in dev mode ({import.meta.env.DEV && <slot />}), so wrapped content is excluded from production builds but reviewable inpnpm 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.
inflightRequestsLimitsupportRemaining 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.draft: truepages are excluded from production builds and drop out of autogenerated sidebar sections gracefully.Checklist
Before submitting the PR make sure the following are checked:
--signoffflag.pnpm buildruns successfully.