Deploy multiples sites from one repo

I want to deploy multiple website [domain pages.dev] from a single Github repo, but using different content based on environment settings. Currently this is not possible, CF Pages only allows one site per repo.
1 Reply
shixzie
shixzie16mo ago
You need to deploy them via the wrangler cli. Create each project/website before trying to deploy with npx wrangler pages project create [project-name/domain] And then deploy each site/project by running in each site folder npx wrangler pages deploy [output dir] —project-name [project-name/domain] You can configure a Github Action to control when each site is deployed. For everything else like custom domains/compat flags/env vars. You configure them in the dashboard. I had to do this same thing last week, currently on my phone so I can’t give you an example Github Action, but this should hopefully be enough to guide you.
Want results from more Discord servers?
Add your server