Skip to content

ci: deploy lit-payments and lit-triggers to Railway - #659

Open
GTC6244 wants to merge 2 commits into
mainfrom
minnetonka-v2
Open

GTC6244 wants to merge 2 commits into
mainfrom
minnetonka-v2

Conversation

@GTC6244

@GTC6244 GTC6244 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Adds GitHub Actions workflows to deploy lit-payments and lit-triggers to Railway via the Railway CLI, mirroring the lit-static release flow. Pushes to main deploy to the Railway staging environment and v* tag pushes deploy to production, with a manual workflow_dispatch fallback. Each railway up uses the build context its Dockerfile needs (repo root for lit-payments so it can reach lit-billing-core; lit-triggers/ for lit-triggers) and authenticates with an environment-scoped Railway project token, so no railway link step is required. Each service README gains a short CI/CD note documenting the workflow.

Requires four repo secrets (Railway project tokens): RAILWAY_TOKEN_PAYMENTS_STAGING, RAILWAY_TOKEN_PAYMENTS_PRODUCTION, RAILWAY_TOKEN_TRIGGERS_STAGING, RAILWAY_TOKEN_TRIGGERS_PRODUCTION; optional vars RAILWAY_PAYMENTS_SERVICE / RAILWAY_TRIGGERS_SERVICE override the default service names.

🤖 Generated with Claude Code

… prod on tag)

Add GitHub Actions workflows that deploy lit-payments and lit-triggers to
Railway via the Railway CLI, mirroring the lit-static release flow: pushes to
main deploy to the "staging" environment and v* tag pushes deploy to the
"production" environment. Auth uses environment-scoped Railway project tokens.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@GTC6244
GTC6244 requested review from a team and a lite review from Copilot September 15, 2026 20:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new deploy workflows diverge from the repo’s established deploy-runner convention (self-hosted) and use a non-reproducible Railway CLI install (@railway/cli@^4), both of which raise operational reliability risk.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds GitHub Actions deploy workflows for the lit-payments and lit-triggers services to deploy to Railway (staging on main, production on v* tags, plus manual workflow_dispatch), and documents the deployment automation in each service README.

Changes:

  • Added .github/workflows/deploy-lit-payments.yml to deploy lit-payments to Railway staging/production via Railway CLI.
  • Added .github/workflows/deploy-lit-triggers.yml to deploy lit-triggers to Railway staging/production via Railway CLI.
  • Updated lit-payments/README.md and lit-triggers/README.md with CI/CD notes and required secrets/vars.
File summaries
File Description
.github/workflows/deploy-lit-payments.yml New Railway deploy workflow for lit-payments (staging on main, production on v*).
.github/workflows/deploy-lit-triggers.yml New Railway deploy workflow for lit-triggers (staging on main, production on v*).
lit-payments/README.md Documents the new Railway CI/CD workflow + required secrets/optional vars.
lit-triggers/README.md Documents the new Railway CI/CD workflow + required secrets/optional vars.
Review details

Suppressed comments (4)

.github/workflows/deploy-lit-payments.yml:82

  • Most deployment workflows in this repo run on self-hosted runners (e.g. deploy-static.yml, deploy-staging.yml, deploy-prod-1-propose.yml). Using ubuntu-latest here may bypass the expected deploy runner environment/policies and makes this workflow inconsistent with the established deploy setup.
    runs-on: ubuntu-latest

.github/workflows/deploy-lit-triggers.yml:83

  • Most deployment workflows in this repo run on self-hosted runners (e.g. deploy-static.yml, deploy-staging.yml, deploy-prod-1-propose.yml). Using ubuntu-latest here may bypass the expected deploy runner environment/policies and makes this workflow inconsistent with the established deploy setup.
    runs-on: ubuntu-latest

.github/workflows/deploy-lit-triggers.yml:96

  • npm install -g @railway/cli@^4 makes deploys non-reproducible because the installed CLI can change over time (new 4.x releases). This can cause unexpected deploy failures without any repo change; consider pinning the Railway CLI to an exact version (and updating it intentionally).
      - name: Install Railway CLI
        run: npm install -g @railway/cli@^4

.github/workflows/deploy-lit-payments.yml:92

  • npm install -g @railway/cli@^4 makes deploys non-reproducible because the installed CLI can change over time (new 4.x releases). This can cause unexpected deploy failures without any repo change; consider pinning the Railway CLI to an exact version (and updating it intentionally).
      - name: Install Railway CLI
        run: npm install -g @railway/cli@^4
  • Files reviewed: 4/4 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/deploy-lit-payments.yml Outdated
Comment thread .github/workflows/deploy-lit-triggers.yml Outdated
Comment on lines +69 to +70
- name: Install Railway CLI
run: npm install -g @railway/cli@^4
Comment on lines +70 to +71
- name: Install Railway CLI
run: npm install -g @railway/cli@^4
Address PR review: match the repo's deploy-runner convention (self-hosted,
as in deploy-static.yml) and pin the Railway CLI to an exact version
(5.57.2) for reproducible deploys. The @^4 range was also incorrect — the
Railway CLI is on v5.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@GTC6244

GTC6244 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — addressed both points in bc9bc19:

  • Runner: switched both workflows to self-hosted to match the repo's deploy convention (deploy-static.yml, deploy-staging.yml, deploy-prod-1-propose.yml). Like deploy-static.yml reaching Cloudflare, these reach Railway over the public internet from the self-hosted runner.
  • CLI pin: pinned the Railway CLI to exact 5.57.2 for reproducible deploys. Note the original @^4 was also wrong — the Railway CLI is on v5, so it would never have resolved a 4.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants