Developer shares five hard-learned lessons for deploying static sites to Cloudflare Workers
A developer documented the setup and pitfalls encountered while migrating a static site from a hosted blogging platform to Cloudflare Workers, using GitHub Actions for CI/CD. The pipeline builds the site, checks for dead links and bad metadata, runs Lighthouse audits, and only deploys to production after all quality gates pass. A key confusion arose from Cloudflare offering two similar products — Pages and Workers — with the latter now being the actively developed option that supports redirects, custom headers, and custom domains. The author also warns that using a custom API token instead of Cloudflare's built-in 'Edit Cloudflare Workers' template leads to cryptic authentication errors, and recommends verifying token permissions with 'wrangler whoami' before connecting to CI. Additionally, once a wrangler.jsonc config file is added, any omitted settings are silently disabled, causing staging URLs and preview links to disappear without obvious error messages.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in