Daily rebuild
Your site rebuilds itself each day, so things with dates stay right. Turn it on if you’ll sell sponsorships, set Editor’s picks with start and end dates, want the automatic website checks to show, or want “new this week” to stay fresh. Otherwise skip it: the site still updates whenever you change it.
How it works: a GitHub workflow calls a deploy hook, an address that tells Cloudflare to rebuild.
The setup opens your site’s settings in Cloudflare: make a deploy hook there for the branch main,
called “daily rebuild” (Cloudflare’s help),
and copy its address (it starts with https://api.cloudflare.com/). It works like a password:
paste it only into the setup, which saves it in GitHub as DEPLOY_HOOK_URL (an encrypted Actions
secret) and never shows it.
Without the repository connected in Cloudflare, the setup offers a fallback: GitHub builds and
deploys your site each day with a Cloudflare token. It opens Cloudflare’s “Create API token” form filled
in (its name, and one permission: Workers Scripts, Edit); you choose your account, create it, and paste
the token once. It’s saved in GitHub as CLOUDFLARE_API_TOKEN, with your account’s ID.
By hand: add it in your repository on GitHub as an Actions repository secret named DEPLOY_HOOK_URL
(GitHub’s help).
Check: run the Daily rebuild workflow once from your repository’s Actions tab; it shows a green
tick in about a minute, and Cloudflare rebuilds your site a minute or two later.
On GitHub Pages there’s nothing to do: its workflow rebuilds by itself. Other hosts: their own deploy hook, the same way.
GitHub turns the workflow off after 60 days without a change to your site. Your editor says when it
has stopped, or hasn’t run for over two days, and how to turn it back on; npm run doctor checks the
same.