data.spad.site.create
Register a SpadSite and its initial SpadBuildConfig so the SPAD provisioning workflows (spad.site-creation-gcp, ...) have a site to dispatch onto. DB-only; idempotent on (organization, name).
Create a SpadSite row (+ linked SpadBuildConfig) so SPAD sites can be stood up via workflows.
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-spad |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | UUID of the organization that will own the site |
name | string | Yes | — | Display name for the site. Slug is generated from this (SpadSite.generate_slug). |
repository | string | No | — | GitHub repository as 'owner/name' (e.g. 'islasoftwarefactory/calendar'). Resolved to github_repository_id inside the org. Mutually exclusive with gitlab_project_uuid. |
gitlab_project_uuid | uuid | No | — | Optional GitLab project UUID, as an alternative source repo to 'repository'. |
cloud_connection_uuid | uuid | Yes | — | UUID of the CloudConnection that hosts the site (GCP, AWS, Cloudflare, ...). |
runner_group_uuid | uuid | No | — | UUID of the RunnerGroup used for SPAD build execution. Required unless cloud_connection_uuid points at a Cloudflare connection; must share the same cloud connection as the site. |
branch | string | No | main | Source branch to build from. Default 'main'. |
provider_type | string | No | — | Optional hosting provider key passthrough (e.g. 'gcp'); informational only, the effective provider is always derived from cloud_connection_uuid. |
framework | string | No | — | Build framework hint (react, vue, angular, next, ...). |
node_version | string | No | 18 | Node.js version for the build. Default '18'. |
install_command | string | No | — | Optional install command override. |
build_command | string | No | npm run build | Build command. Default 'npm run build'. |
output_directory | string | No | dist | Build output directory. Default 'dist'. |
environment_variables | json | No | — | Environment variable KEYS (values live in the secrets manager). |
deployment_strategy | string | No | immediate | DeploymentStrategyType: immediate |
rollout_config | json | No | — | Optional rollout configuration stored on the site. |
auto_deploy_enabled | boolean | No | True | Whether pushes auto-deploy. Default true. |
deploy_on_release | boolean | No | False | Whether repo releases trigger a deploy. Default false. |
deploy_on_release_action | string | No | released | GitHub release action that triggers a deploy. Default 'released'. |
include_prereleases | boolean | No | False | Whether prereleases count for deploy_on_release. Default false. |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | uuid | Yes | — | UUID of the created (or existing) SpadSite |
slug | string | Yes | — | — |
name | string | Yes | — | — |
cloud_connection_uuid | uuid | Yes | — | — |
github_repository_uuid | uuid | No | — | — |
gitlab_project_uuid | uuid | No | — | — |
runner_group_uuid | uuid | No | — | — |
branch | string | Yes | — | — |
deployment_strategy | string | Yes | — | — |
current_build_config_uuid | uuid | No | — | UUID of the SpadBuildConfig linked as current_build_config. Set whenever a build config exists (created now or on the pre-existing site). |
created | boolean | Yes | — | True when this run inserted a new row |
already_exists | boolean | Yes | — | True when a matching (organization, name) site already existed |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
organization_uuid | uuid | No | — | UUID of the organization that will own the site |
repository | string | No | — | GitHub repository as 'owner/name' (e.g. 'islasoftwarefactory/calendar'). Resolved to github_repository_id inside the org. Mutually exclusive with gitlab_project_uuid. |
provider_type | string | No | — | Optional hosting provider key passthrough (e.g. 'gcp'); informational only, the effective provider is always derived from cloud_connection_uuid. |
framework | string | No | — | Build framework hint (react, vue, angular, next, ...). |
node_version | string | No | — | Node.js version for the build. Default '18'. |
install_command | string | No | — | Optional install command override. |
build_command | string | No | — | Build command. Default 'npm run build'. |
output_directory | string | No | — | Build output directory. Default 'dist'. |
environment_variables | json | No | — | Environment variable KEYS (values live in the secrets manager). |
rollout_config | json | No | — | Optional rollout configuration stored on the site. |
auto_deploy_enabled | boolean | No | — | Whether pushes auto-deploy. Default true. |
deploy_on_release | boolean | No | — | Whether repo releases trigger a deploy. Default false. |
deploy_on_release_action | string | No | — | GitHub release action that triggers a deploy. Default 'released'. |
include_prereleases | boolean | No | — | Whether prereleases count for deploy_on_release. Default false. |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | complete | Create SpadSite |
completed | No | Yes | Yes | — | Created |
failed | No | Yes | No | — | Create failed |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | complete | completed | — |
pending | fail | failed | — |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "data.spad.site.create",
"initial_data": {
"organization_uuid": "value",
"name": "value",
"cloud_connection_uuid": "value"
}
}