Fix: How to force Railway deployment when GitHub webhook doesn't ...
Documentation for Sessions
π Fix: How to force Railway deployment when GitHub webhook doesn't ...
Date: 2026-02-03
Time: 18:27:59 UTC
Session: editor2-83.85
Agent: backend
Confidence: 95%
Status: β
Documented
π Decision Context
Question:
How to force Railway deployment when GitHub webhook doesn't trigger builds for backend-api?
Task: Fix Railway deployment not triggering for backend-api
π― Decision Made
Chosen:
Use railway redeploy --yes CLI command to force rebuild
Options Considered:
- Use railway up CLI command (failed: No changes to watched files)
- Create .railway-trigger file in repo root (failed: not in watched paths)
- Modify Dockerfile (failed: deployment/ not in watched paths)
- Create trigger file in apis/backend-api/ (failed: Railway service not watching deploy/api branch)
- Use railway redeploy --yes CLI command (worked: forces rebuild of last deployment)
π Reasoning
Root cause: Railway backend-api service is NOT configured to watch the deploy/api branch. It watches another branch (where session-62 was deployed). The deploy script pushes to deploy/api, but Railway doesn't auto-deploy from that branch. Watch Paths only filter WITHIN the watched branch - they don't matter if the branch itself isn't being watched. Solution: (1) For immediate fix, use 'railway redeploy --yes' after linking to correct project/service. (2) For permanent fix, configure Railway service SettingsβSource to watch 'deploy/api' branch. The --force flag we added creates trigger files but these only work if Railway is watching the branch where commits are pushed.
π Files Involved
tools/scripts/deployment/lib/branch-manager.jstools/scripts/deployment/railway-deploy-cli.jsdeployment/railway.backend.toml
π Related
- Decision ID:
dev_1770143279302_sksu76i - Session: 83
- Workspace: editor2
Auto-generated by MCP Smart Consolidation