This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
Merge pull request #920 from pavlovcik/refactor/move-to-delegated-com… #2590
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: Build | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Enable Corepack and Install Correct Yarn Version | |
run: | | |
corepack enable | |
yarn set version 4.0.2 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20.10.0" | |
cache: "yarn" | |
- name: Install | |
run: yarn install | |
- name: Local Build | |
run: yarn build | |
- name: Lint | |
run: yarn format | |
run-migration: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development') | |
env: | |
SUPABASE_ACCESS_TOKEN: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SUPABASE_ACCESS_TOKEN || secrets.STAGING_SUPABASE_ACCESS_TOKEN }} | |
SUPABASE_DB_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SUPABASE_DB_PASSWORD || secrets.STAGING_SUPABASE_DB_PASSWORD }} | |
SUPABASE_PROJECT_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SUPABASE_PROJECT_ID || secrets.STAGING_SUPABASE_PROJECT_ID }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: supabase/setup-cli@v1 | |
with: | |
version: latest | |
- name: Link Supabase project | |
run: supabase link --project-ref $SUPABASE_PROJECT_ID | |
- name: Run migrations | |
run: supabase db push |