Merge pull request #29 from ful1e5/dev #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Database | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy-db: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js and Yarn | |
uses: actions/setup-node@v4 | |
with: | |
registry-url: https://registry.yarnpkg.com | |
- name: Cache Yarn dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install Yarn dependencies | |
run: yarn install | |
- name: Apply all pending migrations to the database | |
run: npx prisma migrate deploy | |
env: | |
POSTGRES_PRISMA_URL: ${{ secrets.POSTGRES_PRISMA_URL }} | |
POSTGRES_URL_NON_POOLING: ${{ secrets.POSTGRES_URL_NON_POOLING }} |