spad.site.create-from-repo ​
Create a SPAD site from a source repository by importing repo metadata, provisioning hosting, building assets, and binding deployment metadata.
Create a SPAD site from a source repository by importing repo metadata, provisioning hosting, building assets, and binding deployment metadata.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-spad |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
workflow_run_id | string | No | — | DAG-stamped parent run id. |
organization_uuid | uuid | Yes | — | Organization UUID for tenant isolation. |
actor | string | No | — | User or service actor initiating the workflow. |
idempotency_key | string | No | — | Caller-supplied idempotency key for safe retries. |
dry_run | boolean | No | — | Validate and plan without mutating external resources. |
repository | string | Yes | — | Source repository owner/name. |
branch | string | No | — | Source branch or ref. |
connection_uuid | uuid | Yes | — | Cloud connection for hosting resources. |
site_slug | string | Yes | — | SPAD site slug. |
build_config | json | No | — | Build configuration. |
domain | string | No | — | Optional custom domain. |
provider_type | string | No | — | Hosting provider key. |
api_cloud_run_service | string | No | — | (gcp) Optional Cloud Run service name to route /api to. When set, the GCP site becomes the single same-origin edge (static '/' from the bucket, /api to Cloud Run behind a serverless NEG) — no CORS. Absent, the site is static-only (unchanged). |
api_region | string | No | — | (gcp) Region for the /api serverless NEG (e.g. 'us-central1'). Defaults to the site region. |
api_path_prefix | string | No | — | (gcp) Path prefix routed to the Cloud Run backend (default '/api'). |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | No | — | Organization uuid. |
workflow_run_uuid | uuid | No | — | Workflow run uuid. |
status | string | No | — | Status. |
summary | json | No | — | Summary. |
resource_refs | json | No | — | Resource refs. |
warnings | list | No | — | Warnings. |
completed_at | string | No | — | Completed at. |
compensation_trigger | string | No | — | Compensation trigger. |
compensation_results | json | No | — | Compensation results. |
spad_site_creation | json | No | — | Output state_data from DAG step spad_site_creation. |
deploy_static_publish | json | No | — | Output state_data from DAG step deploy_static_publish. |
deploy_domain_bind | json | No | — | Output state_data from DAG step deploy_domain_bind. |
failure_reason | string | No | — | Failure reason. |
failed_step | json | No | — | Failed step. |
failed_layer | json | No | — | Failed layer. |
failed_at_state | string | No | — | Failed at state. |
error | string | No | — | Error. |
error_type | string | No | — | Error type. |
failed_at | string | No | — | Failed at. |
DAG Layers ​
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | 01_spad_site_creation | spad.site-creation | spad.compensation.noop |
| 2 | 02_deploy_static_publish | deploy.static.publish | spad.compensation.noop |
| 3 | 03_deploy_domain_bind | deploy.domain.bind | — |
Execution Flow ​
Compensation ​
When any layer fails, its compensation steps run in reverse order to roll back the work completed so far.
Sub-workflows ​
| Sub-workflow | Step name |
|---|---|
spad.site-creation | spad_site_creation |
deploy.static.publish | deploy_static_publish |
deploy.domain.bind | deploy_domain_bind |
spad.compensation.noop | ack_no_compensation_01_spad_site_creation |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "spad.site.create-from-repo",
"initial_data": {
"organization_uuid": "value",
"repository": "value",
"connection_uuid": "value",
"site_slug": "value"
}
}