Skip to content
Matteo Murru
Back to home

How this site is deployed

Every version is checked, built, released and then monitored. Here is the path from a commit to zapz.work.

Live version

build7de3617

This page was built from this commit: 7de3617, .

Diagram

git pushmain branchGitHub Actions CIlint, build, testsLighthouse CIBuildstatic AstroDocker imagenginx, GHCRDeploymentCloudflare Workersscript + testszapz.workliveSupervisionpersonal serverevery 15 min

Step by step

  1. Push

    I push to the main branch of the GitHub repository. Only this branch goes to production.

  2. GitHub Actions CI

    Lint (astro check and an automatic review of the texts), a static Astro build, then tests on the built site: internal links, valid HTML, and a search for secrets, IP addresses and private paths. Lighthouse CI fails if a page drops below 90 in performance or below 95 in accessibility, best practices and SEO.

  3. Docker image

    A multi-stage build: Node builds the site, nginx serves it. On the main branch, the image is published to GitHub Container Registry, tagged with the commit.

  4. Hosting

    The site runs on Cloudflare Workers: the build files are served as the Worker's static assets, and its code handles redirects (www to the bare domain, http to https, old URLs, trailing slash), security headers, caching of versioned files and the 404 page.

  5. Release

    A script run from my server starts from the exact export of the commit, reinstalls dependencies, rebuilds and runs the tests again, publishes with wrangler deploy, then checks the pages, redirects and 404 online. A version that fails the tests is not published. The CI has the same release job, active once the Cloudflare token is set in the GitHub secrets. Rollback: the previous Worker version.

  6. Monitoring

    A personal server checks zapz.work every 15 minutes (French and English pages, status 200) and alerts me if it fails. A fuller GitHub Actions workflow (title, sitemap, robots, resume) runs on demand: monitoring uses no CI minutes.

The site