Web deploys
You have a build whose output is also a web page, and you want it on a URL. A build can ship as a static site on Cloudflare Workers, straight from the artifacts it already produced.
Creating a deployment
POST /api/projects/{id}/deployments/cloudflareThe deployment names its sourceBuildId. The build's output must contain an index.html; without one the deployment is refused.
What a deployment records
| Field | Values |
|---|---|
provider | cloudflare |
environment | production or preview |
status | draft, queued, deploying, deployed, failed |
scriptName | The Worker script serving the site |
url | Where the site is live |
sourceBuildId | The build the site was made from |
Reading deployments
GET /api/projects/{id}/deployments/cloudflareStatus walks draft, queued, deploying, deployed. A deployment that does not arrive lands on failed. url is set once the deployment reaches deployed.
When it fails
- Refused at creation. The build output has no
index.html. Add one to the browser'soutputDirectoryand rebuild. - Status
failed. The deploy did not reach Cloudflare or was rejected. Create a new deployment from the samesourceBuildId; the build itself is intact. - No
urlyet. The deployment has not reacheddeployed. Poll the GET route;queuedanddeployingare transit states.
