Repository navigation
Commit 4eb1140
ci(docs-deploy): deploy the Object UI docs site (www.objectui.org) from ui/apps/site (#27005)
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoE27UVDXhUp74pztDpSVFdR)_
Part of #26993. This PR carries the code half. The card stays open for
its proof: one `workflow_dispatch` run of the new job on `main` that
prints the deployment URL, after the maintainer action below. Tier H
(`.github/workflows/**`): draft until green, GOVERNED_APPROVERS review
it, the maintainer merges, and no seat enqueues it.
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:根仓 `.github/workflows/docs-deploy.yml` 加第二个作业 `Deploy
objectui docs to Vercel (production)`,和现有 `apps/docs` 作业同一套做法(runner 上
`vercel pull` → `vercel build --prod` → `vercel deploy --prebuilt
--prod`),部署 `ui/apps/site` 到 Vercel 项目 `objectui`(www.objectui.org)。原
`apps/docs` 作业一个字没改。
- **为什么改**:objectui 仓自己的部署 workflow 随 `ui/.github/workflows/`
一起删了,`ui/apps/site/vercel.json` 又关了 Git 自动部署,所以合并后没有任何流程发布
www.objectui.org,18.2 之后的文档改动都上不了线。
- **风险与回滚**:只在 `main` 上按定时(每 6 小时)或手动触发运行,不影响任何 PR 检查。两个作业互相独立,新作业红了不影响
`apps/docs` 的部署。回滚 = revert 本 PR。
- **先看**:`.github/workflows/docs-deploy.yml` 末尾的 `deploy-ui-site` 作业,重点看
"Require the project's Root Directory to be ui/apps/site" 这一步和 build
步骤不带 token 的写法。
- **两分钟验证**:合并后在 Actions 页对 Docs Deploy 点 "Run workflow"(选 `main`)。Root
Directory 改好之前,新作业会在 Root Directory 那一步红,报错里写明要改的设置;改好之后应该绿,并在 summary
里打印部署 URL。
- **需要你做的**:在 Vercel 控制台把项目
`objectui`(`prj_v1rXIczaI7YGmXmseQCLFUFOFxTB`)的 Settings → Build and
Deployment → Root Directory 从 `apps/site` 改成 `ui/apps/site`,然后批准合并本 PR。
## What changes
- `.github/workflows/docs-deploy.yml`:
- The header now names both sites and says the two jobs are independent.
- New job `deploy-ui-site`, named `Deploy objectui docs to Vercel
(production)`. It keeps the shape of the existing `deploy` job:
- the same refusal steps: a ref other than `main`, then a missing
`VERCEL_TOKEN`, each an `::error::` and a red run;
- checkout and `./.github/actions/setup-workspace`;
- `vercel pull` → `vercel build --prod` → `vercel deploy --prebuilt
--prod`, all run from the repository root;
- the same pinned `VERCEL_CLI_VERSION` (`60.1.3`) and the same team id;
the project id is objectui's old one,
`prj_v1rXIczaI7YGmXmseQCLFUFOFxTB`;
- the post-build assertions against `ui/apps/site/.next/BUILD_ID` and
`.vercel/output/config.json`;
- the step-summary line with the deployment URL.
- Two differences from `deploy`, both explained in the job's header:
- A step after `vercel pull` reads `settings.rootDirectory` from the
`.vercel/project.json` the pull wrote. It goes red, naming the dashboard
setting and the value it needs, unless that reads `ui/apps/site`. The
project's setting still reads `apps/site` from when the site lived in
objectui. Without this step that would fail later inside `vercel build`,
with an error that does not name the cause.
- `vercel build` gets no `VERCEL_TOKEN`. Only `pull` and `deploy` call
the Vercel API. This is the card's ask and objectui's original choice:
the build runs every workspace package's lifecycle scripts.
- Not ported, per the card: objectui's pinned-@objectstack restore,
build and save steps. Every @objectstack package the site imports is a
workspace package here.
- The `deploy` job (apps/docs) is byte-for-byte unchanged.
- `ui/apps/site/vercel.json` is unchanged. Its commands work in the
merged layout, as measured below.
## Tests
Cold local build of the exact production command, run the way Vercel
runs it (cwd `ui/apps/site`, then `cd ../..`):
<details><summary>`pnpm turbo run build --filter=@object-ui/site` from
`ui/`, head 137ca90</summary>
- `turbo run --dry=json` from `ui/` resolved this repository's root and
scheduled the site with its whole closure: 67 build tasks, 30 in
@object-ui packages and 37 in @objectstack packages (65 of them have
work to do, per the run below).
- The real run at `--concurrency=2`, under
`scripts/pm/os-verify-lock.sh`: `Tasks: 65 successful, 65 total` ·
`Cached: 0 cached, 65 total` · `WALL 596s EXIT 0`.
- `ui/apps/site/.next/BUILD_ID` was written.
- `pnpm exec turbo --version` reads 2.11.5 from both the root and `ui/`,
so the `cd ../..` into `ui/` does not pick up a different turbo.
</details>
The YAML parses: the jobs are `deploy` and `deploy-ui-site`, with 10
steps in the new job.
## Verification
Derived gates (`node scripts/pm/dispatch-gates.mjs --commands`, 36
commands for this one-file diff). The 35 fast ones were run locally on
137ca90 and every one exited 0. They were run again on the final head
2defad3 (a comment-only change on top), and all 35 exited 0 again. The
long one, `GITHUB_ACTIONS=true GITHUB_EVENT_NAME=push pnpm
check:pm-dispatch-gates`, ran on 2defad3: `✓ dispatch-gates self-test:
2224 cases pass.` (fast 1935, slow 289), `EXIT 0`, 1191 s.
<details><summary>Local gate list, each `:: exit 0`</summary>
- `node scripts/check-closing-keyword-parity.mjs`
- `node scripts/check-closing-keyword-parity.mjs --self-test`
- `node scripts/check-comment-mask-corpus.mjs`
- `node scripts/check-self-test-wired.mjs`
- `node scripts/check-self-test-wired.mjs --self-test`
- `node scripts/check-self-test-workflow-commands.mjs`
- `node scripts/check-self-test-workflow-commands.mjs --self-test`
- `node scripts/check-step-collectors.mjs`
- `node scripts/check-step-collectors.mjs --self-test`
- `node scripts/check-whole-set-label-write.mjs`
- `node scripts/check-whole-set-label-write.mjs --self-test`
- `node scripts/docs-audit/check-drift-comment.mjs`
- `node scripts/pm/ci-failure.mjs --self-test`
- `pnpm check:agent-test-spelling`
- `pnpm check:aggregator-roster`
- `pnpm check:cross-package-test-inputs`
- `pnpm check:declared-population-live`
- `pnpm check:driver-memory-census`
- `pnpm check:gitlink-declared`
- `pnpm check:node-version`
- `pnpm check:nul-bytes`
- `pnpm check:pm-expected-skips`
- `pnpm check:pm-governed-merges`
- `pnpm check:pm-post-stamped`
- `pnpm check:pm-record-recognisers`
- `pnpm check:pnpm-acquisition`
- `pnpm check:pnpm-filter-targets`
- `pnpm check:refd-timer-probe`
- `pnpm check:required-contexts`
- `pnpm check:shard-attestation`
- `pnpm check:stall-guard-budget`
- `pnpm check:stall-guard-headroom`
- `pnpm check:watch-hint-literal`
- `pnpm check:workflow-status-functions`
- `pnpm check:workflow-step-name-quoting`
</details>
CI-only families are read from this PR's check-runs.
NOT MEASURED, and what proves it:
- `vercel pull`, the Root Directory step's reading of
`.vercel/project.json` and the upload. They need `VERCEL_TOKEN`, which
this container does not have. The `settings.rootDirectory` key is what
the CLI's `pull` writes. The first `workflow_dispatch` run on `main`
after the merge is the proof the card asks for.
- Whether the organization's `VERCEL_TOKEN` can deploy to the `objectui`
project. The token belongs to the same team as the `objectstack`
project. This is part of the card's maintainer action.
## Acceptance notes
- **No PR job builds `@object-ui/site`.** The card allowed adding one to
a ui lane, or saying why not. Not added, for three reasons:
- The build is the whole site closure: 65 tasks, 596 s cold on 2 workers
here. `Build UI Deps` hands the ui jobs only its seven @objectstack
packages, so the site's other 30 @objectstack packages and its
@object-ui packages would build cold in every ui PR's run. That is a new
advisory lane on the hottest filter.
- A broken site build is not silent. The deploy job reds at most six
hours after it lands on `main`, and "Run workflow" re-checks it at once.
- The lane can be added later as one job, if the maintainer wants
deploys predicted per PR. That choice is left on #26993 and on #26717's
row 7 rather than taken here.
- `ui/content/docs/guide/ci-cd-pipeline.md` still describes objectui's
deleted `docs-deploy.yml` (its cron, its secret table row). That page's
rewrite or retirement is #26944, so it is not touched here.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L9qibyAYPFxpNP4BCr7Z82)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0eb2d21 commit 4eb1140
1 file changed
Lines changed: 149 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
5 | 16 | | |
6 | 17 | | |
7 | 18 | | |
| |||
206 | 217 | | |
207 | 218 | | |
208 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
0 commit comments