Add Railway deployment config and workflow

railway.toml with NIXPACKS build + /v1/health check.
deploy-railway.yml triggers on push to main and manual dispatch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexa Amundson
2026-02-20 16:50:12 -06:00
parent 6813cd7097
commit 208b28d076
2 changed files with 33 additions and 0 deletions

23
.github/workflows/deploy-railway.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Deploy to Railway
on:
push:
branches: [main]
workflow_dispatch:
jobs:
deploy:
name: Deploy to Railway
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Railway CLI
run: npm install -g @railway/cli
- name: Deploy to Railway
run: railway up --detach
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
RAILWAY_PROJECT_ID: ${{ secrets.RAILWAY_PROJECT_ID }}

10
railway.toml Normal file
View File

@@ -0,0 +1,10 @@
[build]
builder = "NIXPACKS"
buildCommand = "npm ci && npm run build"
[deploy]
startCommand = "npm start"
healthcheckPath = "/v1/health"
healthcheckTimeout = 300
restartPolicyType = "ON_FAILURE"
restartPolicyMaxRetries = 10