theo
CDCloudflare Developers
•Created by dukc on 1/18/2025 in #pages-help
Env variables not being passed to deployment?
note that there is a "production" and "preview" menu at the top of that settings page, so make sure you are setting them for the right env
3 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
at least for now... moving to app router eventually is probably wise, and it seems eventually pages will just merge with workers and some of these CI flows will get better
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
might be back to the original solution, of using multiple pages projects 🤷
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
just migrate 😆 or better yet, move off of next entirely
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
ah shoot
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
since you are already running the deployment from elsewhere, you may want to just try using Workers w/ static assets instead of pages. Each branch would be a separate worker, but I think you'd be able to do what you want otherwise
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
also worth noting- looks like wildcards are not allowed, so you couldnt automatically get branch urls to work
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
ah ok i think I got it to work - had to add the custom domain to the pages project first, and then adjust the CNAME to point to the specific branch
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
although I am using cloudflare DNS, and I just tried it, and doesn't seem to be working
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
it says you must be using cloudflare DNS for this to work
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
so there is this guide - https://developers.cloudflare.com/pages/how-to/custom-branch-aliases/
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
ah - hm lemme take a look
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
nice
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
alternatively, you could try to rely on CF Pages CI and wire up the doppler stuff on this side, but I'd probably stick with GH actions since you are already coordinating with other other moving parts of a larger deployment, and from what I understand GH pages is on its way to being deprecated, eventually merging with workers.
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
some more related info on the branch URLs here - https://github.com/cloudflare/workers-sdk/issues/2410
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
I dont think you need to use separate projects. While every individual deployment gets a new url based on the hash, there are also stable URLs based on the branch name. It's not quite as simple as
branch-name.yourorg.workers.dev
because there is some simple transformation if the name is too long, but for your case the branch names are short so it should be fine.
I think by default you need to be using the pages CI for this to happen, but if you were using the wrangler cli, it looks like you can manually specify which branch you want to deploy to. (see docs). In your case, within your github action you could do something like wrangler pages deploy --branch=staging
27 replies