Pages direct upload - can't set the production branch name

Hey all,

I created a website project in pages and added a CD flow with GH actions.
Once the code is merged to the main branch it is deployed to the staging webapp pages project.
After some checks, it is merged to the prod branch and deployed the same way to another project.
In another project, it stays in the state of preview because the branch si not main, but there is no way to change the main branch name in settings.

The question is - how could I change the name of the main branch in projects of type “direct upload” (that are uploaded via GitHub actions)

BTW, I know that when connecting the webapp to the GH repository, there is a possibility to choose the main branch in settings. How could I do it in the direct upload project?

So, I found kind of solution. Instead of using the action from the Cloudflare tutorial (Cloudflare-pages-github-action), you can use the wrangler action with a custom command (Cloudflare/wrangler-action)

the command would be command: pages publish build --project-name=sandbox-webapp --branch=main and the specified branch should be main, so that the Cloudflare pages will recognize the deployment as production deployment