Cloudflare Pages, Multiple Sites per Repo?

Currently restricted to one site per repo.

What if I want to generate multiple builds for different environments? e.g. dev, test, prod, etc…

What’s my option here?

Hey there! Thanks for reaching out.

Right now you can only connect one repo per project. If you want to generate multiple builds for different environments, this is possible within your project’s build settings, however, you can only create a max of 2 configurations (one for the production environment and one for the preview environment). Navigate to your project > settings > environment variables. Hope this helps!


Got it. This helps a lot thank you!

For anyone else that’s looking for a solution (I have several environments), I pushed config files matching each environment and added more custom domains.

I can test locally or use the preview build, but then if I still want to reference another environment (e.g. dev api servers vs. production) I can use the subdomain of the production build to do so and it will use the corresponding config and api host.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.