Setup all branches other than main to deploy to development environment

AnonymousTRIAL

2 years ago

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.

0 Replies

AnonymousTRIAL

2 years ago

Project ID

d8674d9f-835c-4bee-8966-7d8f1631a17d


2 years ago


AnonymousTRIAL

2 years ago

But that's only triggering for one specific branch. What I want is to deploy to one environment for ALL branches EXCEPT main


AnonymousTRIAL

2 years ago

Or am I missing something in the docs?


2 years ago

I'm gonna admit I am very confused by your question, how would deploying from multiple branches even work?


2 years ago

you can only deploy from a single branch per service


2 years ago

it's a drop down, you can select the branch that you want that service to be deployed from


AnonymousTRIAL

2 years 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.


2 years ago

a single service can only deploy from a single branch at a time


AnonymousTRIAL

2 years ago

Okay, thanks


huyouarePRO

a year ago

@Johannes247 were you able to figure out how to connect your FE preview to BE preview?


Setup all branches other than main to deploy to development environment - Railway Help Station