Cloudflare Pages: Push to Live

What happens in the background when you run git push — every step of the AstroForge build pipeline.

Cloudflare Pages build pipeline visualisation

"Push and forget" — that's the essence of modern deployment philosophy. AstroForge puts this philosophy into practice fully.

The Deploy Flow

Every push to the main branch triggers these steps:

  1. Cloudflare Pages receives a GitHub webhook and starts the build
  2. The Astro build runs: schemas are generated, all pages compile to static HTML
  3. The build output is written to the dist/ directory
  4. Cloudflare Pages distributes the dist/ contents to the CDN
  5. The new deploy is activated; the previous version is kept for automatic rollback

The entire process typically completes within 40–60 seconds.

Build Output Structure

The Astro SSG build output consists of pure static files:

  • dist/tr/ and dist/en/ — per-language HTML directories
  • dist/_astro/ — hashed CSS and JS files produced by Vite
  • dist/vendor/ — Bootstrap CSS/JS (copied from public/vendor)
  • dist/js/app.js — runtime JS (header height measurement, etc.)

JavaScript That Runs

"Static site" sometimes implies no JavaScript — this is incorrect. AstroForge has three JS sources: Bootstrap bundle (dropdowns, carousels), public/js/app.js (header offset calculation, video popup), and Astro islands (not currently used; can be added when needed).

Rollback

Cloudflare Pages retains every successful deploy. If a problem emerges, a single click in the Cloudflare Dashboard reverts to the previous version. Alternatively, git revert undoes the change and a new deploy is triggered.