Dumb question, why build the site on the server? Shouldn’t the site generate on your laptop and then upload the static content to the server? It just seems to me that building on server adds a lot of complexity.
Cloudflare pages, right now, seems to be both the actual hosting, as well as a system for continuous deployment, bundled into one product. You push updates to GitHub, it runs your build (can be any arbitrary script) and then you tell it the folder that contains the built site at the end.
So you could totally build everyting locally and commit the site into a Git repo and use it in that way. It would be nice to have a non-GitHub way to just shove my built website into CF Pages but I don't know if that is on the roadmap.
True but you often want people to make updates that can only either edit markdown files or use some frontend that then calls the build process. (marketing people, copywriters etc).
When you're a hacker who knows how to install dependencies and don't have to use other machines sure.
That’s what we do, more or less: our build step is a no-op and we simply point Cloudflare Pages to the static site directory in the repo where everything is pre-rendered.
Cloudflare Pages is a continuous deployment wrapper on top of Cloudflare Workers. You can choose to use Workers instead, and the workflow will look more like "upload this folder as my site" (local command, no waiting for a cloud builder).
Pages is also missing some Workers features, like being able to see logs, Unbundled Workers for >50ms server-side processes, etc.