cloudflare / pages-action

MIT License
473 stars 97 forks source link

Specifying Direct Upload Project's Production Branch #11

Closed bluk closed 2 years ago

bluk commented 2 years ago

Is there a way to specify which branch should be the "production" branch? I do not see a setting if the Pages project is created as a Direct Upload project.

I created a couple of Pages projects when direct upload was made available. In order to get the Pages project to publish to "production", I had to use a branch named production (which I prefer). It worked even when using this GitHub action repository (using "production" would publish to the production environment and any other branch would create a preview environment)

I created a Pages project today. Now, it seems that I have to use a branch named "main" to get it to publish to production.

StefPtrs commented 2 years ago

Ideally there should be a separate production argument that allows users to pick which builds are production builds. This is more flexible (e.g. if multiple release branches exist for different versions,...). However, this doesn't seem to be supported by the CloudFlare API