3 months ago
Hello,
I’m having an issue with automatic deployments from GitHub in Railway.
My service is correctly connected to the GitHub repository and branch. When I push a new commit, Railway does receive the GitHub event and creates a deployment entry, but the deployment gets cancelled instead of completing.
In GitHub checks, I see:
“Deployment cancelled”
And in Railway, the deployment appears as:
- Deployed via GitHub
- then marked as Removed
- with status Deployment cancelled
Important details:
- Manual deploy using Deploy latest commit works correctly.
- The repository and branch are properly connected.
- I already disconnected and reconnected the GitHub integration.
- I also uninstalled and reinstalled the Railway GitHub App and verified repository permissions in GitHub.
This happens even with a minimal commit (for example, just changing a space), so it does not seem related to the code itself.
It seems the GitHub webhook/event is being received correctly, but the deployment is cancelled internally by Railway before completion.
Could you please help me understand why Railway is cancelling GitHub-triggered deployments?
Thank you.
2 Replies
3 months ago
Hey there,
I took a look at your project and found that the deployment trigger for your nodejs service is missing. This is the internal record that tells Railway "when a push comes in on this branch, build and deploy it." Without it, Railway receives the GitHub webhook and creates a deployment entry, but then immediately cancels it since there is no trigger to process it.
This is a known gap in the reconnection flow: when the GitHub App is uninstalled, triggers get deleted, but reinstalling the app does not automatically recreate them.
To fix this, try reconnecting the repository on the service itself:
- Go to your nodejs service Settings > Source
- Disconnect the repository
- Reconnect it, selecting the same repo and branch
If you see an error about GitHub access being revoked when trying to reconnect, you may also need to reconnect your GitHub account:
- Go to Account Settings > Connected Accounts
- Disconnect GitHub
- Reconnect GitHub
Then retry the service repo connection steps above. After reconnecting, push a test commit to verify auto-deploys are working.
Let me know how it goes!
Status changed to Awaiting User Response Railway • 3 months ago
3 months ago
Hi,
It works now. I tried reconnecting it again and this time the repository and branch were detected correctly, and the issue is resolved.
Thank you for the help!!!
Status changed to Awaiting Railway Response Railway • 3 months ago
Status changed to Solved jake • 3 months ago