spad.cloudflare.deploy_worker ​
Deploy Cloudflare Worker script to production (DAG step)
Deploy the Worker script to production and record provisioning-completed event.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-spad |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | string | Yes | — | SpadSite.id whose Worker should be deployed |
cloud_connection_uuid | string | Yes | — | Cloudflare CloudConnection.id |
worker_script_name | string | Yes | — | Worker script name to deploy |
worker_url | string | No | — | Public Worker URL (for event payload) |
organization_uuid | string | No | — | Organization that owns the site |
workflow_run_id | string | No | — | — |
workflow_run_uuid | string | No | — | Parent workflow run ID stamped by the DAG engine (legacy alias) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
deployed_at | string | Yes | — | ISO8601 timestamp when the Worker was deployed |
completed_at | string | No | — | ISO8601 timestamp when the step reached COMPLETED |
failed_at | string | No | — | ISO8601 timestamp when the step reached FAILED |
workflow_run_id | string | No | — | — |
site_uuid | string | No | — | SpadSite.id whose Worker should be deployed |
cloud_connection_uuid | string | No | — | Cloudflare CloudConnection.id |
worker_script_name | string | No | — | Worker script name to deploy |
worker_url | string | No | — | Public Worker URL (for event payload) |
organization_uuid | string | No | — | Organization that owns the site |
workflow_run_uuid | string | No | — | Parent workflow run ID stamped by the DAG engine (legacy alias) |
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 |
failure_reason | string | No | — | Engine-stamped failure metadata |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | run | Deploy step accepted |
run | No | No | — | complete | Deploying Worker |
completed | No | Yes | Yes | — | Worker deployed |
failed | No | Yes | No | — | Worker deployment failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | run | run | Start Worker deployment |
run | complete | completed | Mark Worker deployment completed |
* (any state) | fail | failed | Mark Worker deployment failed |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "spad.cloudflare.deploy_worker",
"initial_data": {
"site_uuid": "value",
"cloud_connection_uuid": "value",
"worker_script_name": "value"
}
}