Skip to content

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

  1. Push to branch — DeployHQ watches the configured branch (typically master)
  2. Pre-deploy — DeployHQ runs enable-maintenance.sh on the target node
  3. Varnish health check — Hits /maintenance/ endpoint, receives 503, marks node as sick
  4. Traffic stops — Node is removed from load balancer rotation
  5. Build — Assets are compiled in the DeployHQ pipeline
  6. Deploy — Code is synced to the web node
  7. Post-deploy — DeployHQ runs disable-maintenance.sh
  8. Node returns — Varnish detects 200, node re-enters rotation

Pre-deployment

  1. Test in staging — Deploy changes to staging first
  2. Run tests — Cypress E2E tests where applicable
  3. Clear local caches — Avoid committing cache artefacts

Deployment Steps

  1. Deploy code — Push to the configured branch; DeployHQ will deploy to the target environment
  2. 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/ directory
  • disable-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

EnvironmentNotes
ProductionJelastic Enscale, 4 web nodes behind Varnish
Stagingstaging.dezeen.com, database synced from production periodically
Adminadmin.dezeen.com, separate server
LocalValet, MAMP, or Docker (see local-development.md)

DeployHQ Configuration

DeployHQ handles:

  • Build commandsnpm run production in _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