Skip to content

Commit

Permalink
feat: GHA workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Nov 22, 2024
1 parent eb95ab4 commit 8502a20
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/deploy-migrations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Deploy migrations
on:
push:
paths:
# Only run this workflow when migrations are updated
- prisma/migrations/**
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- name: Install dependencies
run: npm install
- name: Apply all pending migrations to the database
run: npx prisma migrate deploy
env:
DATABASE_URL: ${{ secrets.PRODUCTION_DATABASE_URL }}

0 comments on commit 8502a20

Please sign in to comment.