Skip to content

Commit

Permalink
Add GitHub Actions workflow for database migration
Browse files Browse the repository at this point in the history
  • Loading branch information
bigint committed Oct 30, 2024
1 parent 8bbabe9 commit 79d4525
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/db-migrate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: DB Migrate

on:
push:
branches: [main]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
production:
name: Production
runs-on: ubuntu-latest
steps:
- name: Checkout 🚪
uses: actions/checkout@v4

- name: Setup Node.js, pnpm, dependencies and run migrations 🌸
uses: ./.github/actions/db-migration
with:
database_url: ${{ secrets.PRODUCTION_DATABASE_URL }}

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout 🚪
uses: actions/checkout@v4

- name: Setup Node.js, pnpm, dependencies and run migrations 🌸
uses: ./.github/actions/db-migration
with:
database_url: ${{ secrets.TEST_DATABASE_URL }}

0 comments on commit 79d4525

Please sign in to comment.