Build editable source and ship the result as the new dist
build_and_deployRun a build inside a hardened one-shot pod against the site's editable source tree (write source first via write_source_files / list_source_files autoPromote), then atomically swap the build output into the live dist. Reuses the same build pod the GitProject git-deploy flow uses, so the same isolation guarantees apply: no SA token, no DB/Vault reach, NetworkPolicy-restricted egress. The first run writes the chosen buildCommand/outputDir into Site.sourceManifest; subsequent calls can omit those fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| siteId | No | ||
| rootPath | No | Subdirectory inside the source tree where package.json lives. Empty string = source root. Useful for monorepos. | |
| outputDir | No | Override for which directory to ship as the new dist. If omitted, uses the manifest, then auto-detects (dist > build > out > public). | |
| buildCommand | No | Override for the build script's `npm run build` step (e.g. 'npm run build:prod' or 'pnpm vite build'). If omitted, uses the manifest stored on the site, then falls back to 'npm run build'. | |
| saveManifest | No | If true (default), persists the merged manifest back onto the site so future builds default to these settings. Set false to do a one-off build without changing the saved manifest. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| siteId | Yes | ||
| buildLog | Yes | Combined orchestrator + builder log; truncated to ~32 KB to fit MCP responses. | |
| manifest | Yes | ||
| outputDir | Yes | ||
| request_id | No | Server-assigned request correlation id. Quote it when contacting support. | |
| totalBytes | Yes | ||
| filesDeployed | Yes |