PR env is not created if auto deploy is disabled
serdarceran
HOBBYOP

a day ago

If I create a PR while auto-deploy for master branch is disabled, Railway does not spin up a new environment for the PR. Is it expected, then how can I prevent auto-deployment to production as soon as I merge into master branch?

Under Review

0 Threads mention this feature

1 Replies

Railway
BOT

a day ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway 1 day ago


playincity
HOBBY

a day ago

This is expected behavior.

Railway's Pull Request preview environments rely on Git-triggered deployments. If Auto Deploy is disabled, Railway won't create preview environments for new PRs because it isn't processing Git events automatically.

If your goal is:

Create PR preview environments, but

Prevent automatic deployment to production after merging into master

then there isn't currently a built-in way to do both.

A few possible workarounds are:

Keep Auto Deploy enabled and protect the production branch by requiring reviews before merging.

Use a separate production service/environment and deploy to it manually.

Connect Railway to a staging branch (e.g. development) with Auto Deploy enabled, use PR previews there, and manually deploy to production after merging.

It would be useful if Railway supported separate settings such as:

Enable PR Preview Environments

Disable automatic deployments to the production environment after merge

Decoupling preview deployments from production auto-deploy would allow teams to keep preview environments while maintaining manual production releases.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...