Preview Deployments
Preview deployments provide automatic, public URLs for every non-default branch. When you deploy from a branch other than the project’s default branch, deploybase creates or updates a preview at a predictable URL.
URL Pattern
Section titled “URL Pattern”https://{branch}-{slug}.previews.deploybase.euExample: Branch feat/redesign on project my-blog → https://feat-redesign-my-blog.previews.deploybase.eu
Branch Name Sanitization
Section titled “Branch Name Sanitization”Branch names are sanitized for use as DNS subdomains:
| Rule | Example |
|---|---|
| Lowercased | Feature/Auth → feature-auth |
/ and _ replaced with - | feat/new_login → feat-new-login |
Non-alphanumeric (except -) removed | fix@bug#123 → fixbug123 |
| Truncated to fit 63-char subdomain limit | Long names are shortened to include the slug suffix |
How Previews Work
Section titled “How Previews Work”- A deployment is triggered from a non-default branch
- Build runs normally (same process as production builds)
- On success, deploybase creates or updates an edge rule on the
previewspull zone - The
preview_deploymentstable is upserted:(project_id, branch) → deployment_id - The preview URL is immediately accessible
One active preview per branch per project. A new deployment to the same branch replaces the previous preview.
Preview vs Production
Section titled “Preview vs Production”| Aspect | Production | Preview |
|---|---|---|
| Trigger | Default branch deploy | Non-default branch deploy |
| URL | {slug}.sites.deploybase.eu or custom domain | {branch}-{slug}.previews.deploybase.eu |
| CDN | Direct (edge rules on tenant pull zone) | Direct (edge rules on previews pull zone) |
| Access | Public | Public |
| Persistence | Until another deployment is promoted | Until branch is redeployed or preview deleted |
Promoting a Preview to Production
Section titled “Promoting a Preview to Production”Any deployed deployment — including one backing a preview — can be promoted to production instantly. See Rollbacks for the promotion API and details.
Limitations
Section titled “Limitations”- Preview URLs are always public. For password-protected sharing, use Share Links.
- Wildcard DNS (
*.previews.deploybase.eu) is managed by deploybase — no custom domains on previews. - Preview deployments follow the same artifact retention rules as all deployments.