Skip to content

Commit fd8bf20

Browse files
committed
ci: add new workflow for database migration and deployment to Render
1 parent 826107a commit fd8bf20

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/push-master.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Push to master workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
jobs:
10+
migrate:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Migrate database
15+
run: npm run prisma:migrate:deploy
16+
17+
deploy:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Deploy to Render
22+
uses: johnbeynon/render-deploy-action@v0.0.8
23+
with:
24+
service-id: ${{ secrets.RENDER_SERVICE_ID }}
25+
api-key: ${{ secrets.RENDER_API_KEY }}
26+
wait-for-success: true
27+
- name: Deploy to Render

.github/workflows/push.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
- name: Install dependencies
3232
run: npm install
3333

34+
- name: Generate Prisma client
35+
run: npm run prisma:generate
36+
3437
- name: Test
3538
run: npm run test:cov
3639

0 commit comments

Comments
 (0)