feat: allows null values for volunteer birth_date #109
Workflow file for this run
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: Prisma Migrate | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- '**' | |
paths: | |
- 'postgres/migrations/**' | |
push: | |
branches: | |
- 'main' | |
paths: | |
- 'postgres/migrations/**' | |
env: | |
LOCAL_DATABASE_URL: postgresql://user:password@localhost:5432/mapa | |
jobs: | |
deploy-mapa: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
environment: | |
name: ${{ github.ref == 'refs/heads/main' && 'production' || 'staging' }} | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Apply all pending migrations to the database | |
run: npm run migrate:deploy | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
- name: Push changes to the database monogodb | |
run: npm run mongodb:push | |
env: | |
MONGO_DB_URL: ${{ github.ref == 'refs/heads/main' && secrets.PROD_MONGO_DB_URL || secrets.STG_MONGO_DB_URL }} |