Can we have different Preview ENV Variables, for different branches?

We have several different staging/test environments we use to test various work across teams. With Vercel we were using designated deploy branches, that had their own domain & env vars setup. We would have branches like env/dev-1 that deployed to dev-1.test.com with all the correct ENV vars for that environment. I havent' seen a way to have deploys (GH Actions, wrangler) that have different env vars. Is there any way we can handle these? We expect our Preview deploys to be able to point to several different environments.
2 Replies
kian
kian6mo ago
Pages doesn't really support that - it only has two environments, Production and Preview.
unr
unr6mo ago
Yeah, that's what it appears currently. We tried overwriting them dynamically with GH Actions but that didn't seem to work either. Our current strategy is going to be creating individual "page apps" for each environment, so they have dedicated env vars. Unless there is a better suggestion I actually realized with GH Actions we can build our unique .env first, then push it up already built to CF Pages. This should work for now, as we're not building directly on CF
Want results from more Discord servers?
Add your server
More Posts
Is there a way to report a DDOS to Cloudflare that wasn't blocked?I have the nginx logs for it. If there's not a way to do this that's fine, but I'm hoping it's possiHey guys, new to Zaraz (but notHey guys, new to Zaraz (but not Cloudflare). Can anyone help telling me how or where I would tell ZaI want to do some file operations using ffmpegAI want to do some file operations using ffmpeg as soon as a file is uploaded to my storage bucket, a@TigersWay Retry is definitely@TigersWay Retry is definitely recommended but I'd like to understand more about your workload when That sounds like you have a libraryThat sounds like you have a library which is trying to use an unsupported field (`credentials`). WhiCloudFlare Warp Connectivity issue on LaptopCloudflare warp doesnt seem to work on my laptop , but on my Phone it works perfectly fine , what coProblem with human verification through mobile devices.Hello, I'm having an issue when I'm trying to open my application through mobile devices. From the l[Cloudflare image resizing] persistent Error 9412 /HTTP 415 (apparently no origin revalidation)Hi, please direct me to a different channel if it fits better elsewhere. I am doing worker image reswww subdomain redirect stopped working after a whileSince yesterday I have pointed a custom domain to my CF pages via the automatically added CNAME poinHow can I bypass the cache on a page to get new SSR content?I have a site served on Cloudflare pages along with a worker for some SSR content. One of my pages i