Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeLinear
LibraryApp-cloudflare
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Organization UUID.
connection_uuiduuidYes—Cloudflare CloudConnection UUID.
account_refstringNo—Cloudflare account id override; defaults from the connection.
project_namestringYes—Cloudflare Pages project name (e.g. senai-calendar).
production_branchstringNo—Defaults to "main" when absent
deploy_branchstringNo—Defaults to production_branch when absent
bundle_refstringNo—URI of the built static bundle (dist + functions) to upload
bundle_connection_uuiduuidNo—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.
manifestlistNo—Explicit file manifest (path, hash, size) when bundle_ref is not a single archive
env_varsjsonNo—Plain project env vars to set before deploy
secretslistNo—List of {name, value} pairs; vaulted by SensitiveDataMiddleware instead of persisting in cleartext state_data
domainslistNo—Custom domains to ensure bound after deploy
create_if_absentbooleanNo—Create the Pages project if it does not exist; default true
wait_readybooleanNo—Poll for deployment readiness before proceeding; default true

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Organization UUID.
connection_uuiduuidYes—Cloudflare CloudConnection UUID.
account_refstringNo—Cloudflare account id override; defaults from the connection.
project_namestringYes—Cloudflare Pages project name (e.g. senai-calendar).
production_branchstringNo—Defaults to "main" when absent
deploy_branchstringNo—Defaults to production_branch when absent
bundle_refstringNo—URI of the built static bundle (dist + functions) to upload
bundle_connection_uuiduuidNo—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.
manifestlistNo—Explicit file manifest (path, hash, size) when bundle_ref is not a single archive
env_varsjsonNo—Plain project env vars to set before deploy
secretslistNo—List of {name, value} pairs; vaulted by SensitiveDataMiddleware instead of persisting in cleartext state_data
domainslistNo—Custom domains to ensure bound after deploy
create_if_absentbooleanNo—Create the Pages project if it does not exist; default true
wait_readybooleanNo—Poll for deployment readiness before proceeding; default true
deployment_refstringNo—Cloudflare Pages deployment identifier.
deployment_urlstringNo—URL of the created deployment.
production_urlstringNo—Production URL after promotion.
uploaded_countintegerNo—Number of files uploaded in the deployment.
env_appliedintegerNo—Number of plain env vars applied.
secrets_appliedintegerNo—Number of secrets applied.
domains_boundlistNo—Custom domains successfully bound.
pages_project_uuiduuidNo—UUID of the persisted CloudflarePagesProject row.
statusstringNo—CloudflarePagesStatus value (pending/deployed/failed/deleted).
persisted_atstringNo—Timestamp when the project row was persisted.
completed_atstringNo—Timestamp when the deploy workflow completed.
failed_atstringNo—Timestamp when the deploy workflow failed.
failure_reasonstringNo—Engine-stamped human-readable failure reason
failed_at_statestringNo—Engine-stamped state when the workflow failed
failed_stepstringNo—Engine-stamped step name (DAG path)
failed_layerintegerNo—Engine-stamped layer index (DAG path)
errorstringNo—Engine-stamped exception message
error_typestringNo—Engine-stamped exception class name
failure_typestringNo—Engine-stamped failure category (atomic path)
failed_actionstringNo—Engine-stamped action method that raised (atomic path)

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—ensure_projectInputs accepted
boundNoNo—persistCustom domains bound
configuredNoNo—promoteEnv vars + secrets applied
project_readyNoNo—uploadPages project exists
promotedNoNo—bind_domainsProduction URL resolved
uploadedNoNo—configureBundle uploaded as a deployment
completedNoYesYes—Pages project live
failedNoYesNo—Deploy failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingensure_projectproject_ready—
project_readyuploaduploaded—
uploadedconfigureconfigured—
configuredpromotepromoted—
promotedbind_domainsbound—
boundpersistcompleted—
* (any state)failfailed—

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