toolbox · service

Cloudflare Pages

The free static host for every Unni site.

What it is

Cloudflare Pages hosts static sites for free. Each site is a project with a *.pages.dev subdomain, a deployment history and optional custom domains.

How it works

  • A project is either Git-connected or a Direct Uploads project. The choice happens at creation and cannot be changed later.
  • For Git-connected projects you set a production branch, a root directory, a build command and an output directory. Every push to the production branch builds the project.
  • Each deployment gets a unique URL; the project URL points at the latest production one.
  • Deployments can be rolled back, and the previous ones are kept.
  • *.pages.dev subdomains are global across all Cloudflare accounts.

In this project

Seven projects, one repo: unni-root, unni-games, unni-addons, unni-tools, unni-research, unni-portfolio, unni-assets. Each uses root sites/<name>, build command node build.js and output dist. unni-games is the Direct Uploads exception, deployed by GitHub Actions.

Gotchas

  • A push to main rebuilds every connected project, even a docs-only push. Watch paths did not prevent it in our test.
  • Check a subdomain with DNS before naming a project. A taken name silently gets a suffix.
  • The free plan is enough here: static files, no functions.