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.
Deployment Lifecycle
Section titled “Deployment Lifecycle”Deploy triggered (API call or git push) ↓pending → queued → building → deployed ↓ (or) → failed / cancelled| Status | Description |
|---|---|
pending | Deployment created, waiting for build slot |
queued | Build job submitted to Kubernetes |
building | Build in progress (install dependencies, run build command, upload artifacts) |
deployed | Build succeeded, artifacts uploaded to CDN, deployment is accessible |
failed | Build failed — check build logs for errors |
cancelled | Cancelled by user before build completed |
Build Process
Section titled “Build Process”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.
Auto-Promotion
Section titled “Auto-Promotion”When a deployment builds from the project’s default branch (usually main), it auto-promotes to production:
- The project’s
live_deployment_idis 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
Section titled “Promotion and Rollback”Promotion and rollback are the same operation: pointing production at a different deployment.
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.
Artifact Retention
Section titled “Artifact Retention”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
Section titled “Build Logs”Build logs are available for deployments that have started building (building, deployed, or failed):
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.
Related Concepts
Section titled “Related Concepts”- Projects — the parent resource
- Preview Deployments — auto per-branch URLs
- Share Links — share any deployment with external stakeholders
- Build System — how builds execute