cloudflare / pages-action

MIT License
468 stars 95 forks source link

Better environment names #54

Closed aaronadamsCA closed 1 year ago

aaronadamsCA commented 1 year ago

TLDR, environment name should be project-name (Production) or project-name (Preview). This aligns much better with environment functionality in both Cloudflare Pages and GitHub, and results in a much better UX.


This action now includes monorepo support, so I can run it for two Cloudflare projects at once. Currently I can't tell these deployments apart, or configure these environments individually in GitHub.

Worse, environmentName unnecessarily includes the branch name. This results in a new GitHub environment for every branch (you can see how messy this gets here). This seems incorrect; in Cloudflare Pages there are only two environments, Preview and Production. I believe this action should follow the same logic and create only two GitHub environments per Cloudflare Pages project.

So, I'd like to propose updating the calculated environment name to always follow the same template: project-name (Production) or project-name (Preview).

I've done this locally, and as you can see the behaviour is much clearer, and mirrors the Cloudflare dashboard.


image


image