cloudflare.pages.deploy ​
Deploy a static site bundle (dist + functions) to a Cloudflare Pages project via direct upload, optionally configuring env/secrets and a custom domain.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-cloudflare |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Organization UUID. |
connection_uuid | uuid | Yes | — | Cloudflare CloudConnection UUID. |
account_ref | string | No | — | Cloudflare account id override; defaults from the connection. |
project_name | string | Yes | — | Cloudflare Pages project name (e.g. senai-calendar). |
production_branch | string | No | — | Defaults to "main" when absent |
deploy_branch | string | No | — | Defaults to production_branch when absent |
bundle_ref | string | No | — | URI of the built static bundle (dist + functions) to upload |
bundle_connection_uuid | uuid | No | — | Storage connection to download bundle_ref from (aws/gcp/cloudflare-R2/magalu). Defaults to connection_uuid (the deploy connection) when absent, for back-compat with same-connection R2 staging. |
manifest | list | No | — | Explicit file manifest (path, hash, size) when bundle_ref is not a single archive |
env_vars | json | No | — | Plain project env vars to set before deploy |
secrets | list | No | — | List of {name, value} pairs; vaulted by SensitiveDataMiddleware instead of persisting in cleartext state_data |
domains | list | No | — | Custom domains to ensure bound after deploy |
create_if_absent | boolean | No | — | Create the Pages project if it does not exist; default true |
wait_ready | boolean | No | — | Poll for deployment readiness before proceeding; default true |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Organization UUID. |
connection_uuid | uuid | Yes | — | Cloudflare CloudConnection UUID. |
account_ref | string | No | — | Cloudflare account id override; defaults from the connection. |
project_name | string | Yes | — | Cloudflare Pages project name (e.g. senai-calendar). |
production_branch | string | No | — | Defaults to "main" when absent |
deploy_branch | string | No | — | Defaults to production_branch when absent |
bundle_ref | string | No | — | URI of the built static bundle (dist + functions) to upload |
bundle_connection_uuid | uuid | No | — | Storage connection to download bundle_ref from (aws/gcp/cloudflare-R2/magalu). Defaults to connection_uuid (the deploy connection) when absent, for back-compat with same-connection R2 staging. |
manifest | list | No | — | Explicit file manifest (path, hash, size) when bundle_ref is not a single archive |
env_vars | json | No | — | Plain project env vars to set before deploy |
secrets | list | No | — | List of {name, value} pairs; vaulted by SensitiveDataMiddleware instead of persisting in cleartext state_data |
domains | list | No | — | Custom domains to ensure bound after deploy |
create_if_absent | boolean | No | — | Create the Pages project if it does not exist; default true |
wait_ready | boolean | No | — | Poll for deployment readiness before proceeding; default true |
deployment_ref | string | No | — | Cloudflare Pages deployment identifier. |
deployment_url | string | No | — | URL of the created deployment. |
production_url | string | No | — | Production URL after promotion. |
uploaded_count | integer | No | — | Number of files uploaded in the deployment. |
env_applied | integer | No | — | Number of plain env vars applied. |
secrets_applied | integer | No | — | Number of secrets applied. |
domains_bound | list | No | — | Custom domains successfully bound. |
pages_project_uuid | uuid | No | — | UUID of the persisted CloudflarePagesProject row. |
status | string | No | — | CloudflarePagesStatus value (pending/deployed/failed/deleted). |
persisted_at | string | No | — | Timestamp when the project row was persisted. |
completed_at | string | No | — | Timestamp when the deploy workflow completed. |
failed_at | string | No | — | Timestamp when the deploy workflow failed. |
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 |
|---|---|---|---|---|---|
pending | Yes | No | — | ensure_project | Inputs accepted |
bound | No | No | — | persist | Custom domains bound |
configured | No | No | — | promote | Env vars + secrets applied |
project_ready | No | No | — | upload | Pages project exists |
promoted | No | No | — | bind_domains | Production URL resolved |
uploaded | No | No | — | configure | Bundle uploaded as a deployment |
completed | No | Yes | Yes | — | Pages project live |
failed | No | Yes | No | — | Deploy failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | ensure_project | project_ready | — |
project_ready | upload | uploaded | — |
uploaded | configure | configured | — |
configured | promote | promoted | — |
promoted | bind_domains | bound | — |
bound | persist | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "cloudflare.pages.deploy",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value",
"project_name": "value"
}
}