Setup all branches other than main to deploy to development environment

Is there a way to deploy any branch that's not main to a specified environment, e.g. development? I'd like to connect my FE preview deployments to the BE development deployment, to be able to test both together in case I have changes in both.
9 Replies
Percy
Percy11mo ago
Project ID: d8674d9f-835c-4bee-8966-7d8f1631a17d
Johannes247
Johannes24711mo ago
Project ID
d8674d9f-835c-4bee-8966-7d8f1631a17d
Johannes247
Johannes24711mo ago
But that's only triggering for one specific branch. What I want is to deploy to one environment for ALL branches EXCEPT main Or am I missing something in the docs?
Brody
Brody11mo ago
I'm gonna admit I am very confused by your question, how would deploying from multiple branches even work? you can only deploy from a single branch per service it's a drop down, you can select the branch that you want that service to be deployed from
Johannes247
Johannes24711mo ago
What I basically want is that whenever I push to a branch that's not main, the commit will be deployed to my development environment. That will allow me to point my Vercel preview deployments to my Railway development environment, so that I can run my FE previews against BE previews. I know this solution is limited, because if I work on multiple BE branches in parallel, it's gonna overwrite my development deploys. But I can live with that, cause I can't find a simple, better solution.
Brody
Brody11mo ago
a single service can only deploy from a single branch at a time
Johannes247
Johannes24711mo ago
Okay, thanks
Jesse
Jesse5mo ago
@Johannes247 were you able to figure out how to connect your FE preview to BE preview?
Want results from more Discord servers?
Add your server