I would like to deploy my frontend app to Cloudflare pages.
We’re using different branches for develop, test, staging and production. (dev/test/stag/pro)
We want readable preview links for our customers, so we would like to create different URL’s with de different branches connected to it.
I know how to create the different URL’s in the custom domain section, and I know Cloudflare passes the branch name in front off the created link.
But but the problem is, all the preview deployments uses the same ENV data.
So no matter which branch you deploy, it’s all created with the ENV from the dev environment variables.
The production deployment has it’s own ENV section, so that one will work.
That also applies for the dev branch and deployment, that on will work as well
But how do I get the TEST and STAGING environment work without having a separates ENV section in Cloudflare?
Of course you can pass .env files within your deployment, but .env should not live in the repo at all, so that’s not an option.