How to deploy workers in a monorepo using github actions?

I'm building a monorepo with one frontend and two workers. Using a yaml file, suggested in the cloudflare documentation to run github actions, what should I adjust for the deployment to be successful? My current structure: /packages /frontend /worker1 /worker2 /shared Both worker1 and worker2 have imports from shared folder (import from @project/shared)
2 Replies
Jürgen Leschner
I would create separate steps in your deploy action yaml for each worker, and pass the corresponding "workingDirectory" to the cloudflare wrangler-action. The different worker directories should each have their own wrangler.toml https://developers.cloudflare.com/workers/wrangler/ci-cd/
Cloudflare Docs
Run in CI/CD | Cloudflare Workers docs
Deploy your Workers within a CI/CD environment.
GitHub
GitHub - cloudflare/wrangler-action: 🧙‍♀️ easily deploy cloudflare ...
🧙‍♀️ easily deploy cloudflare workers applications using wrangler and github actions - cloudflare/wrangler-action
aniniflare
aniniflare4w ago
Hey, we also just came out with Workers Builds, our native CI/CD environment (in beta). If you are interested in testing it out and playing with it using a monorepo setup, here's a guide on how to get started: https://developers.cloudflare.com/workers/ci-cd/builds/advanced-setups/
Cloudflare Docs
Advanced Setups | Cloudflare Workers docs
Learn how to use Workers Builds with more advanced setups
Want results from more Discord servers?
Add your server