Skip to content
Proud to collaborate with Microsoft for Startups

deploy.static.build-and-publish ​

Build a Vite/SPA on a runner (git clone + build) and stage the built dist/ into a GCS serving bucket, emitting the bucket/prefix/static_url/bundle_ref handoff that deploy.static.publish consumes — the fully-GCP counterpart of cloudflare.pages.build-and-deploy.

Build a Vite/SPA on a runner and stage the built dist/ into a GCS serving bucket.

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-deployments
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Organization UUID (context).
runner_connection_uuiduuidYes—Runner group / backend connection UUID the build runs on (GCP-backed so the runner has ambient GCS credentials).
bucketstringYes—Destination GCS serving bucket.
prefixstringNo—Destination object prefix under the bucket.
github_repository_uuiduuidNo—GitHubRepository UUID to build from; resolved to a clone URL + installation token at launch. Provide this OR repo_clone_url.
repo_clone_urlstringNo—Explicit HTTPS git clone URL (may embed an x-access-token). Used when github_repository_uuid is not given.
repo_full_namestringNo—owner/name; combined with a GITHUB_TOKEN env var into a clone URL when repo_clone_url is not given.
source_refstringNo—Branch/tag/ref to build; default main.
build_commandstringNo—Build command; default 'npm ci && npm run build'.
output_dirstringNo—Static build output dir uploaded to GCS; default 'dist'.
node_versionstringNo—Node.js version; default '20'.
image_referencestringNo—Build image (must contain git, node/npm and the gcloud CLI). Falls back to the runner group default when omitted.
gcp_connection_uuiduuidNo—GCP CloudConnection UUID for the serving bucket; echoed to deploy.static.publish as connection_uuid.
project_idstringNo—GCP project override.
envjsonNo—Plain (non-secret) build env vars.
secret_envjsonNo—Secret Manager env mappings (references, not values).
timeout_secondsintegerNo—Build job timeout.

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidNo—Echoed organization UUID.
runner_execution_uuiduuidNo—Build runner execution UUID.
statusstringNo—Build status.
exit_codeintegerNo—Build process exit code.
log_refstringNo—Runner log reference.
started_atstringNo—ISO-8601 start time.
completed_atstringNo—ISO-8601 completion time.
providerstringNo—Storage provider ('gcp').
connection_uuiduuidNo—GCP connection UUID for the serving bucket (echoed gcp_connection_uuid).
project_idstringNo—GCP project (carried through).
bucketstringNo—Destination GCS bucket.
prefixstringNo—Destination object prefix.
static_urlstringNo—Public GCS URL of the built site entrypoint.
bundle_refstringNo—gs:// URI of the staged assets root.
manifest_refstringNo—gs:// URI of the enumerated manifest.json the runner wrote (files/content-type/size).
manifestlistNo—Enumerated static-file manifest for deploy.static.publish. Hydrated from manifest_ref by the consumer; not populated in-workflow (no GCS read-back primitive exists yet).
uploaded_countintegerNo—Objects uploaded to GCS. Best-effort; may be null until a GCS read-back primitive lets the workflow read the runner-written manifest.
failure_reasonstringNo—Failure reason.
failed_stepjsonNo—Failed step envelope.
failed_layerjsonNo—Failed layer envelope.
failed_at_statestringNo—State where failure occurred.
errorstringNo—Error message.
error_typestringNo—Error class.

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—launch—
waitingNoNo——Polling the build runner execution
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendinglaunchwaiting—
waitingpollwaiting—
waitingcompletecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "deploy.static.build-and-publish",
  "initial_data": {
    "organization_uuid": "value",
    "runner_connection_uuid": "value",
    "bucket": "value"
  }
}