Repository navigation
ci(site): deploy the docs from a GitHub Actions workflow every 6 hours, and turn Vercel's Git-triggered builds off (objectui#12178) - #12182
Merged
Conversation
… the production build stops failing (objectui#12178) Every production build of the Vercel project `objectui` (Root Directory `apps/site`) has failed since 2026-09-06 with `Module not found: Can't resolve '@object-ui/example-schema-catalog'`, so objectui.org has been frozen since then. The project's build command only exists in the Vercel dashboard: `pnpm --filter '../../packages/*' -r build && pnpm build`. Its filter selects `packages/*` only and never builds `examples/schema-catalog`, whose `exports` resolve only into `dist/`. Until #7986 that gap was covered by `apps/site`'s `prebuild` hook (`pnpm --filter @object-ui/example-schema-catalog build`). #7986 removed the hook on purpose so that turbo's `^build` is the only source of build order, and moved every in-repo path to the turbo form, including the root `site:build` script. The dashboard command lives outside the repo, so it was not updated. The deployment for #7986's commit is the first ERROR, and the one for the commit before it is the last READY. CI's `Build Docs` stayed green the whole time because it runs `pnpm turbo run build --filter='@object-ui/site'`, which builds the site's dependency closure, schema catalog included. This adds `apps/site/vercel.json`, which Vercel reads from the Root Directory and which overrides the dashboard values. Its `buildCommand` is that same turbo command, run from the repo root, and its `installCommand` keeps the dashboard's current `pnpm i`. With that, the deploy's build is in the repo and is the build CI validates. Refs: objectui#12178 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, and turn Vercel's Git-triggered builds off (objectui#12178) Almost all of the maintainer's Vercel bill was "Build CPU Minutes" for the `objectui` project. Vercel built once for every commit pushed to `main`, and started a preview build for every other branch that the Ignored Build Step then cancelled. Every production build since 2026-09-06 failed (objectui#12178), so the spend deployed nothing. This repository is public, so `ubuntu-latest` minutes are free. The maintainer decided the docs deploy only from `main`, on free compute, every 6 hours. - `.github/workflows/docs-deploy.yml` runs on a 6-hourly cron (`43 5,11,17,23 * * *`, chosen off the hour and away from the hours other crons already use) and on `workflow_dispatch`. There is no `push` trigger and no `paths` list. The workflow runs `vercel pull`, `vercel build --prod` and `vercel deploy --prebuilt --prod` with a pinned CLI, all from the repo root, because the project's Root Directory is `apps/site`. Vercel builds nothing. The team and project ids are inlined (they are not secrets). `VERCEL_TOKEN` reaches only the `pull` and `deploy` steps: the build step, which runs every dependency's install scripts, never sees it. - Which way it fails: a missing `VERCEL_TOKEN`, or a run on a ref other than `main`, fails red with an `::error::` before checkout. It never skips green, because a silent skip would stop the docs updating without anyone seeing it. `concurrency: docs-deploy-production` with `cancel-in-progress`, because a later run builds a tip that contains the earlier one. - `apps/site/vercel.json` gains `git.deploymentEnabled: false`, which turns off Git-triggered deployments for every branch. The workflow becomes the only path to production. - `content/docs/guide/ci-cd-pipeline.md` gets the workflow's section, its inventory row and the `VERCEL_TOKEN` secret row. `scripts/__tests__/ci-cd-pipeline-doc.test.ts` declares the one command the section names that no `run:` step shows: `turbo run build`, which runs through `vercel build` and the `buildCommand` in `vercel.json`. Refs: objectui#12178 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nly, no deploy) - reverted in the next commit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dry run (run 38200568488) built the site through `vercel pull` and `vercel build --prod` from the repository root: `vercel build` ran the `installCommand` and `buildCommand` from `apps/site/vercel.json`, turbo reported 30 of 30 tasks successful, and the output was written to `.vercel/output`. The deploy step was skipped. The workflow goes back to `schedule` plus `workflow_dispatch` only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hotlong
marked this pull request as ready for review
October 12, 2026 04:10
hotlong
enabled auto-merge
October 12, 2026 04:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs: #12178 · stacked on #12179
Why
Almost all of the maintainer's Vercel bill was "Build CPU Minutes" for the
objectuiproject (Root Directoryapps/site, served at objectui.org). Vercel built once for every commit pushed tomain, and started a preview build for every other branch (claude/*,gh-readonly-queue/*,changeset-release/*, ...) that the dashboard's Ignored Build Step then cancelled. Every production build since 2026-09-06 failed (#12178: 2023 failed production builds, about 9,400 build-minutes, the site frozen). This repository is public, soubuntu-latestminutes are free. The maintainer decided that the docs deploy only frommain, on free compute, every 6 hours.What
.github/workflows/docs-deploy.ymlschedule, cron43 5,11,17,23 * * *(every 6 hours), andworkflow_dispatch. Nothing else: nopushtrigger and nopathslist.grep -rn 'cron:' .github/workflows/shows hours 0/6/12/18, 1/7/13/19 and 2/8/14/20 each already carry another 6-hourly job. 5/11/17/23 meet only one daily patrol, at 05:23. Minute 43 is off the top of the hour and clear of the merge-queue patrol's :37 and :52. A comment in the file records this.concurrency: { group: docs-deploy-production, cancel-in-progress: true }. A later run builds a tip that contains the earlier run's commits, so cancelling the earlier run loses nothing.vercel pull --yes --environment=production, thenvercel build --prod, thenvercel deploy --prebuilt --prod, with the CLI pinned (VERCEL_CLI_VERSION, 60.1.3). The project's Root Directory isapps/site, sovercel buildbuilds inapps/site, readsapps/site/vercel.jsonand writes./.vercel/output, andvercel deploy --prebuiltuploads that directory. I checked this against the pinned CLI's source: the build's work path is the cwd joined with the project'srootDirectory, and the prebuilt output dir is the cwd's.vercel/output. Running from insideapps/sitewould apply the Root Directory twice.VERCEL_ORG_ID(team_06nvlGKZCkwhzdXmRdxeCNnB) andVERCEL_PROJECT_ID(prj_v1rXIczaI7YGmXmseQCLFUFOFxTB) are inlined. They are identifiers, not secrets.VERCEL_TOKENis passed only to thepullanddeploysteps.vercel buildneeds no token (it is in the CLI's no-token command list), and it runspnpm iplus the whole workspace build, which includes every dependency's install scripts, so it never sees the token.VERCEL_TOKENis missing, it stops with::error title=VERCEL_TOKEN is missing::...andexit 1. If the ref is notrefs/heads/main, it stops with::error title=Docs deploy runs from main only::.... A failed build or a failed upload is a red step. Nothing turns into a skipped green.apps/site/vercel.jsongains"git": { "deploymentEnabled": false }. That is Vercel's documented switch for turning off Git-triggered deployments on every branch, and I validated the file againsthttps://openapi.vercel.sh/vercel.json. Once this is merged, Vercel builds nothing on push, and this workflow is the only way to production. TheinstallCommand(pnpm i) and the fixedbuildCommandcome from fix(site): build the docs deploy with the command CI already runs, so the production build stops failing (objectui#12178) #12179.content/docs/guide/ci-cd-pipeline.md: aDocs Deploy (docs-deploy.yml)section, a Workflow Inventory row and aVERCEL_TOKENsecrets row.scripts/__tests__/ci-cd-pipeline-doc.test.ts: one declared entry. The section namesturbo run build, which the job really runs but throughvercel buildandvercel.json, not in arun:step, so the command-parity sweep cannot see it.Secret: already in place
VERCEL_TOKENexists as an organization secret ofobjectstack-ai(gh api repos/objectstack-ai/objectui/actions/organization-secretslists it, updated 2026-10-12T03:10:52Z), and this repository can see it.secrets.VERCEL_TOKENresolves org secrets the same way, so nothing has to be configured before merging. The dry run below used it.Order with #12179
This branch contains #12179's commit. #12179 creates
apps/site/vercel.json, and this PR adds thegitblock to it.origin/maininto this branch. The only conflict will be add/add onapps/site/vercel.json. Resolve it by taking this branch's version, which is fix(site): build the docs deploy with the command CI already runs, so the production build stops failing (objectui#12178) #12179's file plus thegitblock.Evidence
pull_requesttrigger and skipped the deploy step. That commit is reverted on this branch, and the final tree is byte-identical to the reviewed commit. In that run:Vercel CLI 60.1.3 (Node.js 22.23.3),vercel pulldownloaded the production settings into./.vercel/project.json,vercel buildranRunning "install" command: pnpm iandRunning "cd ../.. && pnpm turbo run build --filter=@object-ui/site", turbo reportedTasks: 30 successful, 30 total(including@object-ui/example-schema-catalog:build, the package whose absence breaks the Vercel build in objectui.org has not deployed since 2026-09-06: every Vercel production build fails to resolve @object-ui/example-schema-catalog, because the dashboard build command stopped building it when #7986 removed apps/site's prebuild hook #12178), Next generated 559 of 559 static pages, thenCreated all serverless functions, thenBuild Completed in .vercel/output.builds.jsonshows@vercel/nextwith this file'sinstallCommandandbuildCommand.vercel deploy --prebuilt --produpload. The first real run after merge is that test.run:scripts were not shell-linted). The YAML parses. A local run of the 88scripts/__tests__files that read workflows or the CI/CD page passed, except one test whose timeout was not caused by this change:check-i18n-dead-keys, real-tree leg, 15 s, on a machine at load 4. CI is the judge.After merge
gh workflow run docs-deploy.yml --repo objectstack-ai/objectui --ref main, then watch the run. On green, the step summary prints the deployment URL, and objectui.org should show current content. fix(site): build the docs deploy with the command CI already runs, so the production build stops failing (objectui#12178) #12179's build fix is part of this branch, so that run is expected to be green. If it is red, objectui.org has not deployed since 2026-09-06: every Vercel production build fails to resolve @object-ui/example-schema-catalog, because the dashboard build command stopped building it when #7986 removed apps/site's prebuild hook #12178 has the diagnosis of the build failure this replaces. The run is free either way.gh workflow runline above).Side effects worth knowing:
Vercelcommit status stops appearing on PRs and commits once branches contain thisvercel.json.scripts/dependabot-merge-gate.mjsdoes not read statuses, so nothing waits on it.git.deploymentEnabled: false, so Vercel will still start a preview for them until they pick upmain. The dashboard's Ignored Build Step still cancels those, so leave it in place for now.vercel.jsonand no longer matter.🤖 Generated with Claude Code