Cloudflare pages: deployment repeatedly fails

Since Cloudflare Pages appears to be free (pricing doesn’t seem to be documented if it’s not) but Workers are not, I figured I’d migrate a couple of static sites that are currently running as Cloudflare Workers Sites:

Creating the site in Pages worked perfectly. It cloned the repository, built the site (this one is Gatsby) and deployed it. All looked good.

However since that first one, every other deployment has failed. It always fails at the final step where it deploys to Cloudflare. So there is no visibility into why it’s failing:

|18:40:33.183|success Building production JavaScript and CSS bundles - 31.461s|
|18:40:33.219|success Rewriting compilation hashes - 0.001s|
|18:40:39.489|success Building static HTML for pages - 6.143s - 19/19 3.09/s|
|18:40:39.510|success onPostBuild - 0.020s|
|18:40:39.513|info Done building in 54.121244072 sec|
|18:40:40.327|Deploying your site to Cloudflare's global network...|
|18:41:59.850|Failed due to an internal error|

There also appears to be an issue with verifying DNS ownership. Cloudflare Pages updated my orange cloud DNS record for me, replacing my prior Workers A record with its new Pages CNAME. It did that successfully. However when I look at the custom domain tab on the Pages page, it is stuck on ‘Verifying’. It’s only been an hour so maybe it will confirm eventually, but being as the DNS is always Cloudflare and orange-cloud-ed, I figured it would be near instant.

I don’t know if the two are connected, but it’s a bit disappointing.

Any current issues with Pages? Not sure how to debug it.


Ah, this is interesting. Over and over it would fail, always at the point of deploying to Cloudflare, after several minutes of trying.

Trying random stuff as there was no way to see why, I clicked to enable web analytics in Settings.

After doing that and doing another deploy, it deployed to Cloudflare in … 3 seconds. Success.

Was that a coincidence? That seems … odd. But if anyone else is getting endless failed deploys at that point in the process, try enabling web analytics in the settings and see if that helps.

I have the same problem, but in reverse: I initially had two successful deployments. I then enabled Web Analytics, and haven’t had a successful deployment since. I’ve since disabled Web Analytics, but deployment is still failing.

08:34:07.906	skipping build step: no build command specified
08:34:07.907	Finished
08:34:08.347	Deploying your site to Cloudflare's global network...
08:34:13.560	Failed due to an internal error

Ah. Interesting. There must be some connection between the deployment and that web analytics. Hopefully someone from Cloudflare can advise or fix it.