For a small static site, Cloudflare Pages can watch a dedicated GitHub repository. A push triggers a build, while a failed build leaves the previous deployment online.
Initial setup
- Create a separate repository.
- Create a new Pages project and select it.
- Set the build command to
npm run buildand output directory todist. - Add the custom domain only after the first successful build.
When a deployment fails, identify whether installation, building or upload failed before touching DNS.
Leave a useful record
Record the step that actually fixed it, the device or browser version, and any temporary changes you reverted. That note is often more useful than another bookmark.