Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeLinear
LibraryApp-spad
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
site_uuidstringNo—SpadSite UUID (GitLab path); use either this or repository_uuid+branch_name
repository_uuidstringNo—GitHubRepository UUID (GitHub path)
branch_namestringNo—Branch name pushed (GitHub path); also accepts source_ref
organization_uuidstringNo—Organization UUID; inferred from the repo when omitted
push_refstringNo—Webhook push event ID for idempotency
commit_shastringNo—Head commit SHA
commit_messagestringNo—Head commit message
commit_authorstringNo—Head commit author
commit_datestringNo—Head commit date (ISO-8601)
pusher_namestringNo—Login of the user who pushed

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuidstringNo—Resolved organization UUID (from input or inferred from repo/site)
site_uuidstringNo—Site UUID (GitLab path)
repository_uuidstringNo—GitHub repository UUID (GitHub path)
branch_namestringYes—Branch that was pushed
webhook_sourcestringYes—'github' or 'gitlab' depending on which path was taken
push_refstringNo—Webhook push id propagated from input
commit_shastringNo—Head commit SHA propagated from input
commit_messagestringNo—Head commit message propagated from input
commit_authorstringNo—Head commit author propagated from input
commit_datestringNo—Head commit date propagated from input
pusher_namestringNo—Pusher login propagated from input
matching_siteslistYes—Sites that matched the push and will be deployed (site_uuid/organization_uuid/name/slug)
skipped_siteslistYes—Sites that matched but were skipped (currently always empty)
triggered_countintegerYes—Number of deployments successfully queued
deploymentslistYes—Per-site deployment records (deployment_uuid, workflow_uuid, dispatch_workflow_uuid, site_uuid, site_name)
trigger_errorslistNo—Per-site errors encountered while queuing deployments
initiated_atstringYes—ISO8601 timestamp when the workflow was initiated
sites_found_atstringYes—ISO8601 timestamp when find_sites completed
triggered_atstringNo—ISO8601 timestamp when deployments were triggered (only when matching sites exist)
completed_atstringNo—ISO8601 timestamp when the workflow reached COMPLETED
failed_atstringNo—ISO8601 timestamp when the workflow reached FAILED
failure_reasonstringNo—Reason recorded on the failure path
_children_by_keydictNo—Child workflow ids keyed by 'dispatch:{site_uuid}'
_sites_processeddictNo—Idempotency map of sites already processed by action_trigger_deployments (keyed by site_uuid)
children_aggregatedictNo—Aggregate counts from the last all_children_terminal poll
errorstringNo—Engine-stamped failure metadata
error_typestringNo—Engine-stamped failure metadata
failed_at_statejsonNo—Engine-stamped failure metadata
failed_layerjsonNo—Engine-stamped failure metadata
failed_stepjsonNo—Engine-stamped failure metadata

States ​

StateInitialTerminalSuccessAuto-advanceDescription
initiatedYesNo—find_sites—
finding_sitesNoNo—trigger_deployments—
triggeringNoNo—check_children—
waiting_for_childrenNoNo——Poll spawned dispatch workflows until all reach a terminal state
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
initiatedfind_sitesfinding_sites—
finding_sitestrigger_deploymentstriggering—
triggeringcheck_childrenwaiting_for_children—
waiting_for_childrencheck_childrenwaiting_for_children—
waiting_for_childrencompletecompleted—
* (any state)failfailed—

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"
  }
}