GitHub Actions
CI and Railway deploy automation.
GitHub Actions is the production deployment path. Railway services are
sourceless, so deploys upload the checked-out repository with railway up
instead of relying on Railway native GitHub autodeploys.
CI responsibilities
Workflows validate the repo before deployment: formatting/linting, typechecking,
tests, and package-specific build checks. The deploy workflow runs only after CI
passes on main and the required deploy switches are present.
Railway deploys
Production deploys require:
RAILWAY_TOKENas a project-scoped secret.ENABLE_RAILWAY_DEPLOY=trueas the repo variable.- The target branch
main.
The workflow mirrors .railway/railway.ts watch patterns so only affected
services are uploaded.
Staging and previews
The Railway env scripts support disposable non-production environments. The staging workflow uses the same preview-mode assumptions: Railway public domains, non-indexable public apps, and optional AI/email credentials.