punisher
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 mean, this setup isn't working. any clue? how can i add and also EDIT the cname target in custom domains on cloudflare?
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
im unable to add custom domains on cloudflare project settings like i want them as i cant edit the target, i've added them to my dns provider though. here:
feat/cloudflare
alias URL: https://feat-cloudflare.web-cloudflare.orgName.app
my domain URL: https://feat-cloudflare.projectName.pages.dev
development
alias URL: https://development.web-cloudflare.orgName.app
my domain URL: https://development.projectName.pages.dev
staging
alias URL: https://staging.web-cloudflare.orgName.app
my domain URL: https://staging.projectName.pages.dev
production
alias URL: https://web-cloudflare.orgName.app
my domain URL: https://projectName.pages.dev
27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
this is what i was trying to set up, but thought won't get a different URL for each branch e.g.
branch-name.yourorg.workers.dev
. since, i require it for domain mapping.
alright, will give this a go and let you know if it works out.
thanks a lot for all the detailed help btw!27 replies
CDCloudflare Developers
•Created by punisher on 1/14/2025 in #pages-help
Environment-specific Cloudflare Settings
@theo thanks for the reply! i managed to set this up, one github action yml script (triggered on push to development/staging/production) which installs dependencies, doppler and fetches from doppler based on branch name into a .env file, then builds - hence environment-specific .env file is used, then deploys to an already existing project (limitation: wrangler deploy does not create the project for you, you always have to set up the project at least once beforehand).
The only problem is i have to deploy them as separate cloudflare projects instead of one project with multiple environments. reason being the domain since i want to be able to navigate to each of my environment-website separately for example (to be able to use CNAME i need 3 different urls):
- web-development.appname.app -> appname-development.pages.dev
- web-staging.appname.app -> appname-staging.pages.dev
- web.appname.app (production) -> appname-production.pages.dev
so i'll have 3 cloudflare projects for 1 web-app.
is there a workaround and easy-to-manage setup using cloudflare and github actions?
27 replies