Skip to content

Commit 7587fd4

Browse files
docs(ui-merge): fold objectui.org into objectstack docs, K4 — retire the site, host 301s, links (#27329)
domain:devx#1 · os-tesla · session_01L9qibyMpJZ67jrDrno4jY1 <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoF6updQcwW9xVUmevhhFabA)_ Fixes #27145 Part of #26993 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:删除 `ui/apps/site`(objectui.org 站点)、`ui/content/docs`(201 页)和 `deploy-ui-site` 部署任务;在 `apps/docs/redirects.mjs` 加 184 条只对 objectui.org 主机生效的永久跳转(183 页逐条 + 1 条兜底);37 个 ui package.json 的 homepage、README 链接、console 插件 homepage 改指 objectstack.ai/docs;33 处包描述 "Object UI" 改为 "ObjectUI";读旧文档页的测试和门禁改读 `content/docs/frontend`。 - 为什么改:K1–K3 已把 objectui.org 的内容并入本站,旧站和旧页继续留着就是两份会漂移的文档。 - 风险与回滚:跳转在 objectui.org 域名指向本项目前不生效(#27030),不会影响本站现有 URL;删掉的只有站点、旧页和只为它们存在的测试。回滚即还原本 PR。 - 先看:`apps/docs/redirects.mjs` 的 `objectuiRedirects` 表;下方 "Tests whose page is gone" 一节(哪些测试删了、哪些只删了读页面的那一半);越界声明一节。 - 两分钟验证:`pnpm check:docs-redirects`;`pnpm --dir ui exec vitest run scripts/`;`git grep -n "ui/apps/site\|ui/content/docs" -- ':!**/CHANGELOG.md'` 为空。 - 需要你做的:确认下方两处越界(`content/docs/frontend` 补回 75 条 doc-snippet 标记、一处 `destructive` → `danger`),以及 filter-builder 的类型表在文档删除后改为测试内冻结列表;合并由你来做,合并后按 #27030 迁移域名。 ## What changes **Redirects.** `apps/docs/redirects.mjs` gains `objectuiRedirects`: one row per published path of the old site (the 183 pages under its `content/docs` at the fold, by URL, taken from the final K1 #27168, K2 #27170 and K3 #27179 mapping tables), plus a final catch-all to `/docs/frontend` for the home page, playground, `llms.txt` and OG images. The rows are host-scoped (`has: [{ type: 'host', value: '(?:www\.)?objectui\.org' }]`) and permanent, so they cannot shadow a URL of this site and stay inert until the domains move (#27030). `scripts/check-docs-redirects.mjs` now judges them on the host the destination is served from: every destination is a real page and none is a `docsRedirects` source. No row targets the retired `/docs/ui/{console,studio,setup-app}` pages. **Deletions.** `ui/apps/site` (43 files), `ui/content/docs` (201 files), the `deploy-ui-site` job in `docs-deploy.yml` and its CI wiring, the site-only gates `check-doc-example-ids` and `check-docs-route-eager-closure` with their tests, the three `site-*` script tests, and `ui/e2e/docs-smoke.spec.ts` / `ui/e2e/cascading-options.spec.ts`, which drove the site. `rfcs/0001-clipboard-paste.md` moves to `ui/docs/rfcs/` and `guide/console-architecture.md` to `ui/docs/design/`. The lockfile drops the site importer. **Links.** The `homepage` field of 37 `package.json` files under `ui/`, the `homepage` in `ui/apps/console/plugin.ts`, the README and skill links that pointed at objectui.org or at `ui/content/docs`, `CONTRIBUTING.md`'s UI documentation paragraph, and the root `README.md`. Each URL goes to the page that carries its content now (the redirect table), keeping a fragment only where the target page has that heading. The Console package's homepage is `/docs/build-without-code`, its plugin manifest's is `/docs/frontend`. The changeset covers the 35 published `@object-ui/*` packages whose metadata changed and `@objectstack/skills`. **Spelling.** 33 package `description` fields say "ObjectUI" instead of "Object UI". **Readers re-pointed.** The ui doc gates and their tests read `content/docs/frontend` (root = `ui/`, so labels read `../content/docs/frontend/…`); floors were re-measured on 34 pages (76 files with the READMEs). `check-doc-links` now judges the 61 `objectstack.ai/docs` URLs against `apps/docs` instead of trusting them. `markdown-test-inputs` resolves the monorepo docs tree too, and its ledger is re-keyed. The ui CI filter also covers `content/docs/ui/pages.mdx`, which two Test UI pins now read. ### Tests whose page is gone K1 kept 34 pages of the 183 as files; the renderer pages became one table (`frontend/renderers.mdx`) with no interface fences, and several guides were dropped or moved into platform pages. A test that pinned such a page was re-pointed when its content still exists, and otherwise lost only the leg that read the page: - Re-pointed to the page's new home: most of them (e.g. the three `guideCrudAppRenders` tests, the layout and app-shell guide pins, `page-body-arity-8310`, `readme-kanban-example-8256`). Two follow content that K2 moved: `objectname-binding-required-11605` reads the block table in `content/docs/ui/pages.mdx`, and `element-data-source-objectname-waiver-11117` reads its `element:number` fence there. - Deleted whole (their only subject was a page that no longer exists): `slotted-pages-header-example-11165`, `button-group-doc-surface-6347`, `component-docs-disabled-inherited-7239`, `component-docs-retired-handler-keys-7340`, `chart-type-doc-row-11521`, `schema-reference-named-list-view-keys-7923`, `public-block-doc-examples-bag-11321`, `calendar-doc-key-set-8830`. - Page legs removed, declaration/mirror/renderer legs kept: `overlay-node-slot-doc-types-7082`, `overlay-trigger-union-7081`, `alert-dialog-read-dialect-7104`, `div-guidance-names-box` (three surfaces now), `object-kanban-group-by-limit-7322`, `catalog-gallery-render` and `plugin-dashboard-gallery-render` (the docs-site host parity cases), `page-actions-refusal-7926` (one control whose example moved to `/docs/ui/pages`), and the named-subject list in `object-calendar-record-source-7313`. - ⚠️ `filter-builder-mirror-6939`: decision batch #88 made the published doc the authority for `FilterField.type`, and the doc is gone. The doc's last 14-member union is now a frozen `LAST_PUBLISHED_TYPES` list in the test, and the set-equality pin still holds the mirror to it in both directions. That brings back the hand-kept list objectui#8774 removed, for want of a source; the doc reader and its objectui#9073 fixtures went with the page. Every retired leg carries a short `objectstack#27145` note at its site. ### Bounded fixes outside the claim The claim (comment 6471445866) allows no edits to `content/docs/**` page bodies beyond link fixes. Two edits under `content/docs/frontend` go past that, both needed to keep the gates this PR moves onto those pages green: - 75 `{/* doc-snippet: fragment — … */}` markers restored above fences in 17 pages. They stood on the same fences in the old pages; K1 dropped them, so `check:doc-snippets` reported every fragment as a compile failure once it read `content/docs/frontend`. The marker text is the old page's, unchanged. - One `"variant": "destructive"` → `"variant": "danger"` in `frontend/layout.mdx`, the value `action:button` declares; the doc-types gate refused the old spelling. No other page body changed. The seat should amend the claim if it accepts these. ## Acceptance notes `git grep -n "ui/apps/site\|ui/content/docs" -- ':!**/CHANGELOG.md'` prints nothing. `git grep -n "objectui.org" -- ':!**/CHANGELOG.md'` prints 66 lines, all history comments, fixtures or the redirect machinery: - Redirect machinery: `apps/docs/redirects.mjs` (5), `apps/docs/lib/site.ts` (1), `scripts/check-docs-redirects.mjs` (1). - CORS wildcard fixtures that use the host as sample data: `packages/plugins/plugin-hono-server/src/pattern-matcher.test.ts` (19), `hono-plugin.test.ts` (3) and its `README.md` (3), `packages/adapters/hono/src/hono.test.ts` (4). - Host-matching fixtures: `ui/packages/cli/src/__tests__/check-schema-marker.test.ts` (2), `check-jsonc-parse.test.ts` (1); the ruling note in `ui/packages/cli/src/commands/check.ts` (1). - `check-doc-links`: the gate's history sections and its objectstack#27145 note (`ui/scripts/check-doc-links.mjs`, 10) and two test-header lines (`ui/scripts/__tests__/check-doc-links.test.ts`, 2). - History comments: `.github/workflows/ci.yml` (3), `.github/workflows/docs-deploy.yml` (2), `ui/e2e/live/cascading-options.spec.ts`, `ui/packages/layout/src/__tests__/app-shell-docs-nav-example.test.ts`, `ui/scripts/__tests__/zero-test-member-exclusion-9106.test.ts`, `ui/scripts/check-doc-fence-languages.mjs`, `ui/scripts/check-doc-json-fences.mjs` (1 each). - The changeset (2) and the root `CHANGELOG.md` (2, history). ## Tests - `pnpm --dir ui exec vitest run scripts/`: 171 files, 4915 passed, 2 skipped. - The 92 package, app and example test files that read docs pages: all pass. - Type-checks: `packages/types` (`tsconfig.test.json`), `examples/schema-catalog` (`tsconfig.test.json`), `apps/console`, and the seven packages whose tests changed. ## Verification `node scripts/pm/dispatch-gates.mjs --commands` derives 150 commands for this diff after merging `main` at 38bbc2f (re-merged at 7674028: clean, the ledger audit and the new tests it brought pass). All 150 ran locally: - 143 exited 0 on the first pass. - Fixed and re-run green: `check-skills-token-ratchet` (two skill links paid by deleting text in the same file), `vitest run scripts/` (the expression-carriage fence floor after the merge; `check-vi-mock-inherit` had timed out under the sweep's load and passes alone), `check-plugin-teardown-shape --self-test` (needed the pinned sha fetched). - `pnpm --filter @objectstack/spec run check:docs` and `check:skill-examples` refused at first for want of a built `@objectstack/spec`; after `pnpm --filter @objectstack/spec build` both exit 0 (232 generated files in sync; 270 prose examples type-check). - Not measured locally, prerequisite only: `check:dts-closure` and `check:dual-build-cjs-loads` read every package's `dist`, which this checkout has not built. This diff changes no build inputs; CI runs both. Known red on `main` too: the census non-firing control (layout `page.tsx:462`) fails on `origin/main` as well, so it is not this PR's. Tier H, over 3000 changed lines: draft until green, Tesla merges. **Re-merge 2026-10-29 (head 6a7c779).** `main` brought #27275, which deleted `ui/packages/vscode-extension`; the modify/delete conflicts resolved to the deletion on both sides (the extension's `export-to-react-compiles` leg and its ledger row go with the package). That package held the tree's last two self-repo GitHub URLs, so `check-doc-links.test.ts`'s sweep now finds none and its population floor is gone; the `selfRepoPath` unit test still feeds the extractor every URL shape. Re-run after the merge: `vitest run scripts/` (one red, the floor above, then green), the 36 changed package tests, `markdown-test-inputs --audit`, `check-docs-redirects`, `check:doc-types` / `doc-snippets` / `doc-examples` / `doc-json` / `readme-exports` / `skill-examples`, `docs:check-links`, the ui CLI `check`, spec `check:liveness`, `lint:root`, the ui package lint and root `pnpm lint`: all exit 0. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (`packages/spec` is not touched.) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes (exit 0 after merging `main` at 7674028). - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: not touched, nothing to regenerate. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English (the 维护者速读 summary excepted, per the dispatch convention). - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L9qibyMpJZ67jrDrno4jY1 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 28872e6 commit 7587fd4

430 files changed

Lines changed: 1483 additions & 49115 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
'@objectstack/skills': patch
3+
'@object-ui/console': patch
4+
'@object-ui/auth': patch
5+
'@object-ui/cli': patch
6+
'@object-ui/collaboration': patch
7+
'@object-ui/components': patch
8+
'@object-ui/core': patch
9+
'@object-ui/create-plugin': patch
10+
'@object-ui/data-objectstack': patch
11+
'@object-ui/fields': patch
12+
'@object-ui/i18n': patch
13+
'@object-ui/layout': patch
14+
'@object-ui/mobile': patch
15+
'@object-ui/permissions': patch
16+
'@object-ui/plugin-calendar': patch
17+
'@object-ui/plugin-charts': patch
18+
'@object-ui/plugin-chatbot': patch
19+
'@object-ui/plugin-dashboard': patch
20+
'@object-ui/plugin-designer': patch
21+
'@object-ui/plugin-detail': patch
22+
'@object-ui/plugin-editor': patch
23+
'@object-ui/plugin-form': patch
24+
'@object-ui/plugin-gantt': patch
25+
'@object-ui/plugin-grid': patch
26+
'@object-ui/plugin-kanban': patch
27+
'@object-ui/plugin-list': patch
28+
'@object-ui/plugin-map': patch
29+
'@object-ui/plugin-markdown': patch
30+
'@object-ui/plugin-report': patch
31+
'@object-ui/plugin-timeline': patch
32+
'@object-ui/plugin-tree': patch
33+
'@object-ui/plugin-view': patch
34+
'@object-ui/providers': patch
35+
'@object-ui/react': patch
36+
'@object-ui/react-runtime': patch
37+
'@object-ui/types': patch
38+
---
39+
40+
docs(ui): package homepages and README links point at objectstack.ai/docs; objectui.org is retired
41+
42+
Clause-②: no
43+
Metadata-protocol: none
44+
45+
The ObjectUI documentation site at objectui.org is retired. Its pages now live in the ObjectStack docs, mostly under [User Interface](https://objectstack.ai/docs/frontend). Every `@object-ui/*` package's `homepage` and README links now go to the matching page there, and the old objectui.org addresses answer with a permanent redirect to the same page. The `description` fields spell the product name "ObjectUI". The `@objectstack/skills` bundle's ObjectUI skill links to the same pages. Nothing else changes in what these packages ship.

‎.changeset/config.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,6 @@
122122
"access": "public",
123123
"baseBranch": "main",
124124
"updateInternalDependencies": "patch",
125-
"ignore": ["@object-ui/example-*", "@object-ui/site", "@object-ui/runner", "@object-ui/test-support"],
125+
"ignore": ["@object-ui/example-*", "@object-ui/runner", "@object-ui/test-support"],
126126
"privatePackages": { "version": true, "tag": false }
127127
}

‎.github/workflows/ci.yml‎

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ jobs:
451451
# spelled it, exactly as the two narrower `skills/` entries were.
452452
- 'docs/**'
453453
# The objectui tree, the root files the ui jobs build from, and the
454-
# three roots outside ui/ that the ui jobs' gates and tests read
454+
# four roots outside ui/ that the ui jobs' gates and tests read
455455
# (objectstack#25712):
456456
# - every root workflow, not ci.yml alone: Lint UI's pre-install
457457
# import graph check scans all of `.github/workflows/` for ui
@@ -464,7 +464,14 @@ jobs:
464464
# objectstack#26097. Lint UI's skill gates (skills-paths,
465465
# skill-examples, skill-eval-tokens, doc-json,
466466
# shell-escape-residue) and Test UI's skill readers find it
467-
# through `ui/scripts/skill-bundle-root.mjs`.
467+
# through `ui/scripts/skill-bundle-root.mjs`;
468+
# - `content/docs/frontend/**`, the ObjectUI SDK pages since the
469+
# objectui.org docs folded into this site. Lint UI's doc gates
470+
# (doc-types, doc-snippets, doc-json, doc-fences, spec-symbols)
471+
# and the Test UI tests that render a guide's example read them;
472+
# - `content/docs/ui/pages.mdx`, where the per-element data
473+
# binding section of the old data-source guide landed. Two Test
474+
# UI pins read its fences and its block table (objectstack#27145).
468475
ui:
469476
- 'ui/**'
470477
- 'pnpm-lock.yaml'
@@ -473,6 +480,8 @@ jobs:
473480
- '.github/workflows/**'
474481
- '.github/prompts/**'
475482
- 'skills/objectui/**'
483+
- 'content/docs/frontend/**'
484+
- 'content/docs/ui/pages.mdx'
476485
# turbo.json's `globalDependencies`: every build task hashes
477486
# them, so they move what the ui jobs build, the SDUI manifest's
478487
# regeneration included (#26137).
@@ -3981,8 +3990,10 @@ jobs:
39813990
# when the tree moved under `ui/` (it reads only this repository's
39823991
# `.github/workflows/`), and which objectstack#25712 deleted with the
39833992
# rest of `ui/.github/workflows/`. They judge what objectui ships
3984-
# — `ui/content/docs/**`, the skill bundle (`skills/objectui/**` at the
3985-
# repository root since objectstack#26097), the package READMEs and the
3993+
# — the ObjectUI SDK pages (`content/docs/frontend/**` since the
3994+
# objectui.org docs folded into this site), the skill bundle
3995+
# (`skills/objectui/**` at the repository root since objectstack#26097),
3996+
# the package READMEs and the
39863997
# documented component types — so the change most likely to trip them is
39873998
# a docs-only or skills-only PR, which the `filter` job's `ui` globs
39883999
# include.
@@ -3999,7 +4010,9 @@ jobs:
39994010
# job's own restore and save serve the build below). Retired since: the
40004011
# Action Ref Convention scan, which judged objectui's own workflows and
40014012
# went with them (objectstack#25712); a repository-wide action-ref
4002-
# convention needs a home that no `ui` path filter skips (sub-issue 4).
4013+
# convention needs a home that no `ui` path filter skips (sub-issue 4);
4014+
# and the Doc Example Id and Docs Route Eager Closure checks, which
4015+
# judged the retired objectui.org site and went with it.
40034016
- name: Control Byte Scan — Scan tracked text files for raw control bytes
40044017
if: ${{ !cancelled() }}
40054018
run: pnpm --dir ui run check:control-bytes
@@ -4035,10 +4048,6 @@ jobs:
40354048
pnpm --dir ui run check:doc-fences --self-test
40364049
pnpm --dir ui run check:doc-fences
40374050
4038-
- name: Doc Example Id Check — Check documented example ids against the catalog registry
4039-
if: ${{ !cancelled() }}
4040-
run: pnpm --dir ui run check:doc-example-ids
4041-
40424051
- name: Doc Component Type Check — Check documented component types against the registry
40434052
if: ${{ !cancelled() }}
40444053
run: pnpm --dir ui run check:doc-types
@@ -4059,10 +4068,6 @@ jobs:
40594068
if: ${{ !cancelled() }}
40604069
run: pnpm --dir ui run check:skill-eval-tokens
40614070

4062-
- name: Docs Route Eager Closure Check — Weigh the docs route eager closure
4063-
if: ${{ !cancelled() }}
4064-
run: pnpm --dir ui run check:docs-route-closure
4065-
40664071
- name: Install dependencies
40674072
id: install
40684073
if: ${{ !cancelled() }}

‎.github/workflows/docs-deploy.yml‎

Lines changed: 6 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
name: Docs Deploy
22

3-
# The ONE path by which this repository's two docs sites reach production,
4-
# one job each:
3+
# The ONE path by which this repository's docs site reaches production: the
4+
# `deploy` job, Vercel project `objectstack`, Root Directory `apps/docs`.
55
#
6-
# - `deploy`: the ObjectStack docs, Vercel project `objectstack`, Root
7-
# Directory `apps/docs`;
8-
# - `deploy-ui-site`: the Object UI docs at www.objectui.org, Vercel project
9-
# `objectui`, Root Directory `ui/apps/site`. That site came here with the
10-
# objectui tree; objectui's own copy of this workflow was deleted with the
11-
# rest of `ui/.github/workflows/`, and nothing else deploys it. Its header
12-
# below says what differs from `deploy`.
13-
#
14-
# Everything this header says applies to both jobs. The two are independent:
15-
# one going red does not stop or cancel the other.
6+
# The Object UI docs site (www.objectui.org) was retired when its pages folded
7+
# into this one. Its old URLs answer host-scoped permanent
8+
# redirects from `apps/docs/redirects.mjs` (`objectuiRedirects`) once the
9+
# objectui.org domains point at this project; nothing deploys it any more.
1610
#
1711
# ## Why the build runs here and not on Vercel
1812
#
@@ -217,139 +211,3 @@ jobs:
217211
echo
218212
echo "Deployment: ${{ steps.deploy.outputs.url || 'none (the run stopped before the deploy step finished)' }}"
219213
} >> "$GITHUB_STEP_SUMMARY"
220-
221-
# ── The Object UI docs site (www.objectui.org) ─────────────────────────────
222-
#
223-
# The same build-here, upload-prebuilt path as `deploy` above, for the Vercel
224-
# project `objectui`. `ui/apps/site/vercel.json` turns that project's Git
225-
# deployments off (`git.deploymentEnabled: false`), so this job is the only
226-
# thing that publishes the site, and every failure is red, as above.
227-
#
228-
# What differs from `deploy`, and why:
229-
#
230-
# - The project's Root Directory must read `ui/apps/site`. It read
231-
# `apps/site` while the site lived in the objectui repository, and it is
232-
# a dashboard setting that no file here can change. A step right after
233-
# `vercel pull` reads the setting the pull wrote and goes red, naming the
234-
# setting and its value, when it is anything else; without that step
235-
# the old value fails later inside `vercel build`, as an error that does
236-
# not say a dashboard setting is the cause.
237-
# - `vercel build` gets no token. It runs `vercel.json`'s install and build
238-
# commands, which run every workspace package's lifecycle scripts, and
239-
# it does not call the Vercel API. Only the `pull` and `deploy` steps,
240-
# which do, see VERCEL_TOKEN. objectui's own workflow made this choice
241-
# for the same reason.
242-
# - objectui's pinned-@objectstack restore and build steps are not ported.
243-
# In this repository every @objectstack package the site imports is a
244-
# workspace package, and `vercel.json`'s build command builds it from
245-
# this tree through turbo's `^build`.
246-
#
247-
# The site's own install and build commands live in `ui/apps/site/vercel.json`
248-
# and are unchanged from objectui: `pnpm i` installs this whole workspace from
249-
# any member directory, and its build command's `cd ../..` lands in `ui/`,
250-
# from which turbo resolves this repository's root and builds
251-
# `@object-ui/site` with its full closure (65 tasks, all built, on the
252-
# local run measured below).
253-
deploy-ui-site:
254-
name: Deploy objectui docs to Vercel (production)
255-
runs-on: ubuntu-latest
256-
# The build behind `vercel.json`'s command (the site, its @object-ui
257-
# packages and their @objectstack closure: 65 turbo tasks, none cached)
258-
# measured 596 s at `--concurrency=2` on a shared dev container; the runner
259-
# adds install and upload.
260-
timeout-minutes: 30
261-
env:
262-
# Identifiers, not credentials, as in `deploy`: the same team, and the
263-
# project that serves www.objectui.org.
264-
VERCEL_ORG_ID: team_06nvlGKZCkwhzdXmRdxeCNnB
265-
VERCEL_PROJECT_ID: prj_v1rXIczaI7YGmXmseQCLFUFOFxTB
266-
# The same pin as `deploy`'s VERCEL_CLI_VERSION; move the two together.
267-
VERCEL_CLI_VERSION: '60.1.3'
268-
# The value the project's Root Directory must have; see the header.
269-
VERCEL_ROOT_DIRECTORY: ui/apps/site
270-
steps:
271-
- name: Refuse any ref but main
272-
if: github.ref != 'refs/heads/main'
273-
run: |
274-
echo "::error::Docs Deploy publishes to PRODUCTION and runs only from main; this run is on ${GITHUB_REF}. Re-run it with 'main' selected in the branch picker."
275-
exit 1
276-
277-
- name: Require the Vercel token
278-
env:
279-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
280-
run: |
281-
if [ -z "${VERCEL_TOKEN:-}" ]; then
282-
echo "::error::The secret VERCEL_TOKEN is not visible to this run, so www.objectui.org cannot be deployed and production is NOT being updated. It is provided as an objectstack-ai ORGANIZATION secret: check that it still exists and that this repository is in its repository access list (org Settings -> Secrets and variables -> Actions). Then re-run this workflow."
283-
exit 1
284-
fi
285-
echo "VERCEL_TOKEN is set."
286-
287-
- name: Checkout repository
288-
uses: actions/checkout@v7
289-
290-
- name: Setup workspace
291-
uses: ./.github/actions/setup-workspace
292-
293-
# From the repository root, for the reason `deploy`'s comment on this
294-
# step gives: the CLI applies the Root Directory relative to its cwd.
295-
- name: Pull the production project settings
296-
env:
297-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
298-
run: npx --yes "vercel@${VERCEL_CLI_VERSION}" pull --yes --environment=production --token="$VERCEL_TOKEN"
299-
300-
- name: Require the project's Root Directory to be ui/apps/site
301-
run: |
302-
set -euo pipefail
303-
actual="$(node -e "
304-
const fs = require('node:fs');
305-
const file = '.vercel/project.json';
306-
if (!fs.existsSync(file)) { console.log('(vercel pull wrote no ' + file + ')'); process.exit(0); }
307-
const settings = JSON.parse(fs.readFileSync(file, 'utf8')).settings || {};
308-
console.log(settings.rootDirectory ?? '(not set)');
309-
")"
310-
if [ "$actual" != "$VERCEL_ROOT_DIRECTORY" ]; then
311-
echo "::error::The Vercel project ${VERCEL_PROJECT_ID} has Root Directory '${actual}', and this repository builds the site from '${VERCEL_ROOT_DIRECTORY}'. Nothing is deployed. A maintainer sets it in the Vercel dashboard: project objectui -> Settings -> Build and Deployment -> Root Directory = ${VERCEL_ROOT_DIRECTORY}. Then re-run this workflow."
312-
exit 1
313-
fi
314-
echo "Root Directory: ${actual}"
315-
316-
# No VERCEL_TOKEN here; see the header. TURBO_FORCE for the reason
317-
# `deploy`'s build step gives.
318-
- name: Build the site (vercel build --prod)
319-
env:
320-
TURBO_FORCE: 'true'
321-
run: npx --yes "vercel@${VERCEL_CLI_VERSION}" build --prod
322-
323-
- name: Assert the build produced a deployable output
324-
run: |
325-
set -euo pipefail
326-
if [ ! -f ui/apps/site/.next/BUILD_ID ]; then
327-
echo "::error file=ui/apps/site/vercel.json::vercel build exited 0 but produced no ui/apps/site/.next/BUILD_ID - the site was not built, so nothing is deployed."
328-
exit 1
329-
fi
330-
if [ ! -f .vercel/output/config.json ]; then
331-
echo "::error::vercel build exited 0 but wrote no .vercel/output/config.json at the repository root - there is no prebuilt output to deploy."
332-
exit 1
333-
fi
334-
echo "Built the objectui site: BUILD_ID=$(cat ui/apps/site/.next/BUILD_ID)"
335-
336-
- name: Deploy the prebuilt output to production
337-
id: deploy
338-
env:
339-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
340-
run: |
341-
set -euo pipefail
342-
url=$(npx --yes "vercel@${VERCEL_CLI_VERSION}" deploy --prebuilt --prod --token="$VERCEL_TOKEN")
343-
echo "url=${url}" >> "$GITHUB_OUTPUT"
344-
echo "Deployed: ${url}"
345-
346-
- name: Publish the run to the summary
347-
if: always()
348-
run: |
349-
{
350-
echo "### Docs Deploy (www.objectui.org) — ${{ job.status }}"
351-
echo
352-
echo "Commit: \`${{ github.sha }}\` (${{ github.event_name }})"
353-
echo
354-
echo "Deployment: ${{ steps.deploy.outputs.url || 'none (the run stopped before the deploy step finished)' }}"
355-
} >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)