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:

  1. Use railway up CLI command (failed: No changes to watched files)
  2. Create .railway-trigger file in repo root (failed: not in watched paths)
  3. Modify Dockerfile (failed: deployment/ not in watched paths)
  4. Create trigger file in apis/backend-api/ (failed: Railway service not watching deploy/api branch)
  5. 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


πŸ”— Related


Auto-generated by MCP Smart Consolidation