Deployment Guide
PM Summary: Deployments use DeployHQ. The build pipeline compiles assets. Maintenance scripts take each node out of the load balancer during deployment. No manual cache purging is required when using the maintenance workflow.
Deployments are handled by DeployHQ. The build pipeline compiles assets (Laravel Mix), and maintenance scripts take each web node out of the load balancer during deployment.
How Deployment Works
- Push to branch — DeployHQ watches the configured branch (typically
master) - Pre-deploy — DeployHQ runs
enable-maintenance.shon the target node - Varnish health check — Hits
/maintenance/endpoint, receives 503, marks node as sick - Traffic stops — Node is removed from load balancer rotation
- Build — Assets are compiled in the DeployHQ pipeline
- Deploy — Code is synced to the web node
- Post-deploy — DeployHQ runs
disable-maintenance.sh - Node returns — Varnish detects 200, node re-enters rotation
Pre-deployment
- Test in staging — Deploy changes to staging first
- Run tests — Cypress E2E tests where applicable
- Clear local caches — Avoid committing cache artefacts
Deployment Steps
- Deploy code — Push to the configured branch; DeployHQ will deploy to the target environment
- Post-deploy — See Post-deploy checklist below
Post-deploy Checklist
After deployment, verify:
- [ ] Site loads correctly
- [ ] Cache is serving fresh content (Varnish purges if needed)
- [ ] Cloudflare cache purged if static assets changed (via dezeen-cloudflare-purge-manager plugin)
- [ ] No errors in
wp-content/debug.log(when debug enabled) - [ ] Key pages: homepage, article, category, search
Maintenance Scripts
Located in setup/production/deployhq/:
enable-maintenance.sh— Creates_project/_web/maintenance/directorydisable-maintenance.sh— Removes maintenance directory
Varnish probes /maintenance/ every 5 seconds. A 503 response marks the backend as sick and removes it from rotation. Removing the maintenance directory restores 200 and brings the node back.
See setup/production/deployhq/maintenance-deployment-setup.md for full details.
Environments
| Environment | Notes |
|---|---|
| Production | Jelastic Enscale, 4 web nodes behind Varnish |
| Staging | staging.dezeen.com, database synced from production periodically |
| Admin | admin.dezeen.com, separate server |
| Local | Valet, MAMP, or Docker (see local-development.md) |
DeployHQ Configuration
DeployHQ handles:
- Build commands —
npm run productionin_project/_web - Pre-deploy — Run enable-maintenance script
- Post-deploy — Run disable-maintenance script
Ensure the new agency has access to the DeployHQ project and understands the configured deployment targets.
Considerations
- Algolia — If schema or index structure changed, re-index may be required
- Cloudflare — Cache purge via plugin if content or assets changed
- Varnish — Automatic per-node; manual purge available if needed
- Database — No migrations typically run; apply SQL manually if needed