Guidance on Turborepo / Monorepo App Deployment to...
# workers-help
s
I am currently working on a project involving the deployment of various workers / pages in a Turborepo. Ideally, I'm aiming to trigger deployments only for the applications that have been updated, rather than deploying all applications with each change. This would certainly help streamline the process and optimize resources. Does anyone have a reference or guide that provides a step-by-step procedure for achieving this? Any insights, suggestions, or resources would be much appreciated!
f
Wondering the same thing, following đź‘€
m
I am kinda doing this but there is not really a guide. I also think it is somewhat straight forward. In my monorepo every worker is its own
/app
so it has its own wrangler file and definitions etc in that app folder. I have some shared libs that all of them use. Typical turborepo setup with shared libs & apps. I have the wrangler deploy command in my package.json as deploy command. And then turborepo will figure out on ci when I call
turbo run deploy
which deploys to run depending on where the code changes are. In summary I have not a dedicated guide, but there is also no hidden complexity. If you have specific questions let me know.
s
So you are not setting up actions per folder or use the official actions provided by cloudflare?
How are you then doing e.g. preview deploys?
Or only dev / prod and pray?
m
I have an example for preview/staging/prod using turbo and release-please that might be similar to what you're looking for: https://github.com/msutkowski/cf-previews-test/blob/main/.github/workflows/staging.yml. this is a little more involved than what m0c mentioned, but it's also due to how we release things