workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

🚀 Feature Request: Multiple Pages Projects from Same Github Repo

Open osdiab opened this issue 3 years ago • 5 comments
trafficstars

Describe the solution

Not sure if this is the right place to post this, but I would love for Cloudflare Pages to support multiple projects from the same repo. I have two use cases:

Multiple deploy environments

My app has separate internal, staging, and production deployments. All of them run the same code but are tracked in different branches. To achieve this today with Cloudflare Pages I need to have the same code in 3 different repos—doable, but not very transparent.

Multiple projects in a monorepo

My app consists of several subprojects that depend on one another and share the same tooling/idioms. The easiest way to handle this in our use case is to put everything together in a monorepo so that projects can cross reference shared code and tooling, and my team can collaborate on the same codebase. As such I would like to be able to deploy each of the projects independently despite them being in the same repo.

Thanks in advance and hope that this gets prioritized! The workarounds for these seem to be just not using a monorepo structure or having several redundant projects, but I wish it could be more elegant than that. Thanks!

osdiab avatar Aug 28 '22 04:08 osdiab

We’re currently evaluating Cloudflare Pages for our company, and this issue is the one big blocker for us.

I would love to have some kind of solution for this.

(not affiliated with OP)

krishan avatar Aug 31 '22 16:08 krishan

Same here. For us, the main problem is that the functions directory is expected at the root and there's no option to choose a different directory for it (there's an option to choose the static asset directory, but not the functions dir).

fubhy avatar Sep 07 '22 14:09 fubhy

I made it work for my project by just adding another step to my monorepo's root build command, that copies the functions to the root. It's ugly but it works

osdiab avatar Sep 08 '22 12:09 osdiab

That said it does not solve the above issues I mentioned. It just makes one project deploy.

osdiab avatar Sep 08 '22 12:09 osdiab

I made it work for my project by just adding another step to my monorepo's root build command, that copies the functions to the root. It's ugly but it works

Yeah we've done the same in the past but it's indeed rather ugly :-P. Being able to simply configure a working-directory like other github actions commonly do woud solve this nicely.

fubhy avatar Sep 08 '22 13:09 fubhy

Hey,

We're tracking this internally, it is on the roadmap! I recommend following the blog (https://blog.cloudflare.com/) and joining our Discord (https://discord.gg/cloudflaredev) to stay up to date :)

WalshyDev avatar Oct 19 '22 14:10 WalshyDev

Any new developments?

gslaller avatar Mar 08 '23 13:03 gslaller

Hey @WalshyDev I'm curious, we are already running else this scenario and we would like to move to CF pages with rest of our deployments, is it possible to have it? What's are recent developments on this? Thank you for any heads up!

yangwao avatar Mar 30 '23 13:03 yangwao