-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (33 loc) · 1.16 KB
/
Copy pathdeploy-backend.yml
File metadata and controls
37 lines (33 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Deploy backend
# Deploy the hosted backend to Railway on every push to main that touches
# something the backend actually cares about. The desktop app ships
# separately via publish.yml and can't trigger a backend deploy.
on:
push:
branches: [main]
paths:
- 'packages/backend/**'
- 'packages/shared/**'
- 'Dockerfile'
- 'railway.toml'
- '.dockerignore'
- '.github/workflows/deploy-backend.yml'
workflow_dispatch: {}
jobs:
deploy:
runs-on: ubuntu-latest
# Guard so forks / PRs from forks can't burn Railway credits.
if: github.repository == 'Gilbert09/talyn'
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Railway CLI
# npm-based install: the curl|sh installer runs under dash and dies on
# a bash-only substitution, and never puts the binary on PATH for the
# next step. npm's global bin is already on PATH. (Node is preinstalled
# on ubuntu-latest.)
run: npm i -g @railway/cli
- name: Deploy
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
run: railway up --ci --service fastowl-backend