cloudflare.pages.auto-deploy-push
Handle a GitHub push webhook by matching Cloudflare Pages projects on (repository, branch) and dispatching a build-and-deploy per match. Removes the need for a GitHub Actions deploy job.
Overview
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-cloudflare |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
repository_uuid | string | No | — | GitHub repository UUID from the push webhook (matches CloudflarePagesProject.github_repository_uuid). |
branch_name | string | No | — | Branch pushed; also accepts source_ref. |
organization_uuid | string | No | — | Org UUID; inferred from the matched project(s) when omitted. |
push_ref | string | No | — | Webhook push id for idempotency. |
commit_sha | string | No | — | Commit SHA pushed. |
commit_message | string | No | — | Commit message. |
commit_author | string | No | — | Commit author. |
pusher_name | string | No | — | Login of the pusher. |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
repository_uuid | string | No | — | GitHub repository UUID from the push webhook (matches CloudflarePagesProject.github_repository_uuid). |
branch_name | string | No | — | Branch pushed; also accepts source_ref. |
organization_uuid | string | No | — | Org UUID; inferred from the matched project(s) when omitted. |
push_ref | string | No | — | Webhook push id for idempotency. |
commit_sha | string | No | — | Commit SHA pushed. |
commit_message | string | No | — | Commit message. |
commit_author | string | No | — | Commit author. |
pusher_name | string | No | — | Login of the pusher. |
matching_projects | list | No | — | Projects matched (pages_project_uuid/project_name). |
skipped_projects | list | No | — | Projects considered but skipped (currently always empty). |
triggered_count | integer | No | — | Number of build-and-deploy children dispatched. |
deployments | list | No | — | Per-project dispatch records (child_workflow_uuid, pages_project_uuid, project_name). |
trigger_errors | list | No | — | Per-project dispatch errors. |
children_aggregate | dict | No | — | Aggregate counts from the last children poll. |
_children_by_key | dict | No | — | Child workflow ids keyed by 'dispatch:{pages_project_uuid}'. |
initiated_at | string | No | — | ISO8601 timestamp when the workflow was initiated. |
triggered_at | string | No | — | ISO8601 timestamp when children were dispatched. |
completed_at | string | No | — | ISO8601 timestamp when the workflow completed. |
failure_reason | string | No | — | Engine-stamped human-readable failure reason |
failed_at_state | string | No | — | Engine-stamped state when the workflow failed |
failed_step | string | No | — | Engine-stamped step name (DAG path) |
failed_layer | integer | No | — | Engine-stamped layer index (DAG path) |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
failure_type | string | No | — | Engine-stamped failure category (atomic path) |
failed_action | string | No | — | Engine-stamped action method that raised (atomic path) |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | find_projects | Push webhook accepted |
finding_projects | No | No | — | trigger_deployments | Match projects on (repository, branch) |
triggering | No | No | — | — | Dispatch + poll build-and-deploy children |
completed | No | Yes | Yes | — | All dispatched children terminal (or nothing matched) |
failed | No | Yes | No | — | A dispatched child failed or an error occurred |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
initiated | find_projects | finding_projects | — |
finding_projects | trigger_deployments | triggering | — |
triggering | check_children | triggering | — |
triggering | complete | completed | — |
* (any state) | fail | failed | — |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "cloudflare.pages.auto-deploy-push",
"initial_data": {
"repository_uuid": "value",
"branch_name": "value",
"organization_uuid": "value",
"push_ref": "value"
}
}