2 months ago
I've got a GitHub repo that I run three railway services off of. One's an API, one's a worker, and one's a scheduler. They're all based off of the same branch and the same GitHub repo but they all have different start commands. And the API auto deploys when I merge or commit into the main branch for that repo, but the worker and the scheduler, which are, again, set to the exact same branch as the API, don't automatically deploy. The branch that all three are set to here is main.
I am able to get them to deploy the latest commit if I click on the service and press command+K and select "deploy latest commit".
These services were not deployed from a github template repo.
Whats going on here?
3 Replies
2 months ago
This is most likely caused by watch paths. If your worker and scheduler services have watch paths configured in their service settings, only commits that change files matching those paths will trigger a deploy. Your API service likely either has no watch paths set (so every commit triggers it) or has paths that match the files you're changing. Check each service's Settings tab for the "Watch Paths" configuration and either remove them or adjust them to include all relevant file paths. More info here: Monorepo Watch Paths.
Status changed to Awaiting User Response Railway • 2 months ago
jake
This is most likely caused by watch paths. If your worker and scheduler services have watch paths configured in their service settings, only commits that change files matching those paths will trigger a deploy. Your API service likely either has no watch paths set (so every commit triggers it) or has paths that match the files you're changing. Check each service's Settings tab for the "Watch Paths" configuration and either remove them or adjust them to include all relevant file paths. More info here: [Monorepo Watch Paths](https://docs.railway.com/deployments/monorepo#watch-paths).
2 months ago
thanks, but i just checked and my watch paths for all services are empty. i actually just want them to all to deploy whenever theres a change so is leaving them blank the right course of action? or should i add a * ?
Status changed to Awaiting Railway Response Railway • 2 months ago
joeberg-positive-sum
thanks, but i just checked and my watch paths for all services are empty. i actually just want them to all to deploy whenever theres a change so is leaving them blank the right course of action? or should i add a \* ?
2 months ago
oh you know what, i think it was because i had accepted the updated github permissions from the railway app. seems to be working. gonna close this now. thanks
Status changed to Solved joeberg-positive-sum • 2 months ago