spad.auto-deploy-push ​
Handles automatic deployments triggered by GitHub push webhooks
Handles automatic deployments triggered by GitHub push webhooks.
Input fields: repository_id, branch_name, push_id (optional), commit_sha (optional), commit_message (optional), commit_author (optional), commit_date (optional), pusher_name (optional), organization_id (optional)
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-spad |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | string | No | — | SpadSite UUID (GitLab path); use either this or repository_uuid+branch_name |
repository_uuid | string | No | — | GitHubRepository UUID (GitHub path) |
branch_name | string | No | — | Branch name pushed (GitHub path); also accepts source_ref |
organization_uuid | string | No | — | Organization UUID; inferred from the repo when omitted |
push_ref | string | No | — | Webhook push event ID for idempotency |
commit_sha | string | No | — | Head commit SHA |
commit_message | string | No | — | Head commit message |
commit_author | string | No | — | Head commit author |
commit_date | string | No | — | Head commit date (ISO-8601) |
pusher_name | string | No | — | Login of the user who pushed |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | string | No | — | Resolved organization UUID (from input or inferred from repo/site) |
site_uuid | string | No | — | Site UUID (GitLab path) |
repository_uuid | string | No | — | GitHub repository UUID (GitHub path) |
branch_name | string | Yes | — | Branch that was pushed |
webhook_source | string | Yes | — | 'github' or 'gitlab' depending on which path was taken |
push_ref | string | No | — | Webhook push id propagated from input |
commit_sha | string | No | — | Head commit SHA propagated from input |
commit_message | string | No | — | Head commit message propagated from input |
commit_author | string | No | — | Head commit author propagated from input |
commit_date | string | No | — | Head commit date propagated from input |
pusher_name | string | No | — | Pusher login propagated from input |
matching_sites | list | Yes | — | Sites that matched the push and will be deployed (site_uuid/organization_uuid/name/slug) |
skipped_sites | list | Yes | — | Sites that matched but were skipped (currently always empty) |
triggered_count | integer | Yes | — | Number of deployments successfully queued |
deployments | list | Yes | — | Per-site deployment records (deployment_uuid, workflow_uuid, dispatch_workflow_uuid, site_uuid, site_name) |
trigger_errors | list | No | — | Per-site errors encountered while queuing deployments |
initiated_at | string | Yes | — | ISO8601 timestamp when the workflow was initiated |
sites_found_at | string | Yes | — | ISO8601 timestamp when find_sites completed |
triggered_at | string | No | — | ISO8601 timestamp when deployments were triggered (only when matching sites exist) |
completed_at | string | No | — | ISO8601 timestamp when the workflow reached COMPLETED |
failed_at | string | No | — | ISO8601 timestamp when the workflow reached FAILED |
failure_reason | string | No | — | Reason recorded on the failure path |
_children_by_key | dict | No | — | Child workflow ids keyed by 'dispatch:{site_uuid}' |
_sites_processed | dict | No | — | Idempotency map of sites already processed by action_trigger_deployments (keyed by site_uuid) |
children_aggregate | dict | No | — | Aggregate counts from the last all_children_terminal poll |
error | string | No | — | Engine-stamped failure metadata |
error_type | string | No | — | Engine-stamped failure metadata |
failed_at_state | json | No | — | Engine-stamped failure metadata |
failed_layer | json | No | — | Engine-stamped failure metadata |
failed_step | json | No | — | Engine-stamped failure metadata |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | find_sites | — |
finding_sites | No | No | — | trigger_deployments | — |
triggering | No | No | — | check_children | — |
waiting_for_children | No | No | — | — | Poll spawned dispatch workflows until all reach a terminal state |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | find_sites | finding_sites | — |
finding_sites | trigger_deployments | triggering | — |
triggering | check_children | waiting_for_children | — |
waiting_for_children | check_children | waiting_for_children | — |
waiting_for_children | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "spad.auto-deploy-push",
"initial_data": {
"site_uuid": "value",
"repository_uuid": "value",
"branch_name": "value",
"organization_uuid": "value"
}
}