Skip to content

Deployments

A deployment is an immutable snapshot of built static files produced by a single build. Once created, a deployment is never modified — it has a permanent CDN URL.

Deploy triggered (API call or git push)
pending → queued → building → deployed
(or) → failed / cancelled
StatusDescription
pendingDeployment created, waiting for build slot
queuedBuild job submitted to Kubernetes
buildingBuild in progress (install dependencies, run build command, upload artifacts)
deployedBuild succeeded, artifacts uploaded to CDN, deployment is accessible
failedBuild failed — check build logs for errors
cancelledCancelled by user before build completed

Each build runs in an isolated Kubernetes Job: clone repo, install dependencies, run build command, upload artifacts to CDN, configure edge rules, and send notifications. See Build System for full details on isolation, resource limits, and Docker images.

When a deployment builds from the project’s default branch (usually main), it auto-promotes to production:

  • The project’s live_deployment_id is updated
  • The CDN edge rule is rewritten to serve the new deployment
  • CDN cache is purged

Non-default branch deployments create or update a preview deployment instead.

Promotion and rollback are the same operation: pointing production at a different deployment.

Terminal window
curl -X POST https://api.deploybase.eu/api/v1/projects/PROJECT_ID/promote \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"deployment_id": "DEPLOYMENT_ID"}'

This is instant — no rebuild occurs. Only deployments with status=deployed can be promoted. See Rollbacks for details.

Deployments are retained using a union rule (whichever keeps more):

  • Last 10 deployments per project
  • All deployments less than 30 days old

Artifacts for expired deployments are garbage-collected from CDN storage.

Build logs are available for deployments that have started building (building, deployed, or failed):

Terminal window
curl https://api.deploybase.eu/api/v1/deployments/DEPLOYMENT_ID/logs \
-H "Authorization: Bearer $TOKEN"

For failed builds, errors typically appear near the end of the log.