Pages deploy uses HEAD branch all the time

For Workers & Pages, what is the name of the domain?

traveltrove.shy-river-d4b9.workers.dev

What is the issue or error you’re encountering

We have a Next.js (15) app that is deployed via a Worker using the npm @cloudflare/next-on-pages package. The build triggers and completes ok but when it uploads the files to the Pages instance, the Page instance uses the “HEAD” branch and creates a preview deployment. We’ve set production branches on both Worker and Pages to “main” and this used to work normally until yesterday.

What steps have you taken to resolve the issue?

  • Tried changing the production branch, figuring it might “reset” something. Same issue
  • I was able to get a deploy through but had to pass the branch argument to the deploy command with a hardcoded branch name i.e. --branch=main. This isn’t ideal.

This topic was automatically closed after 15 days. New replies are no longer allowed.