-
Notifications
You must be signed in to change notification settings - Fork 34
45 lines (35 loc) · 1.04 KB
/
core-to-railway.yml
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
38
39
40
41
42
43
44
45
name: Jonogon Core to Railway
on:
push:
branches:
- production
paths:
- apps/jonogon-core/**/*
- .github/workflows/core-to-railway.yml
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node 22
uses: actions/setup-node@v3
with:
node-version: 22
- name: Install pnpm
run: npm install -g pnpm
- name: Install packages
run: pnpm install
- name: Install Railway
run: npm install -g @railway/cli
- name: Run Database Migrations
working-directory: ./misc/migrator
run: pnpm run migration up
env:
DATABASE_URL: ${{ secrets.DATABASE_PUBLIC_URL }}
- name: Deploy
working-directory: ./apps/jonogon-core/
run: |
railway up --service jonogon-core > deploy.log 2>&1 || (echo "Deployment failed. Check the logs for details:" && cat deploy.log)
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_DEPLOY_TOKEN }}