Skip to content

Commit

Permalink
Merge pull request #10 from digitalaidseattle/qa
Browse files Browse the repository at this point in the history
Qa
  • Loading branch information
jnakaso authored Jan 16, 2025
2 parents cda6699 + f149430 commit 52e75c2
Show file tree
Hide file tree
Showing 117 changed files with 2,832 additions and 6,386 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/supabase-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy to Supabase on merge

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18' # Ensure compatibility with Supabase CLI

- name: Install dependencies
run: npm install

- name: Install Supabase CLI locally
run: npm install supabase

- name: Authenticate Supabase CLI
run: npx supabase login --token "${{ secrets.SUPABASE_ACCESS_TOKEN }}"

- name: Link Supabase Project
run: npx supabase link --project-ref "${{ secrets.SUPABASE_PROJECT_REF }}" --password "${{ secrets.SUPABASE_DB_PWD }}"

- name: Deploy migrations
run: npx supabase db push --password "${{ secrets.SUPABASE_DB_PWD }}" --include-all

- name: Deploy Edge Functions
run: |
if [ -d "supabase/functions" ] && [ "$(ls -A supabase/functions)" ]; then
npx supabase functions deploy
else
echo "No functions to deploy."
fi
39 changes: 39 additions & 0 deletions .github/workflows/supabase-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy to Supabase on PR

on: pull_request

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18' # Ensure compatibility with Supabase CLI

- name: Install dependencies
run: npm install

- name: Install Supabase CLI locally
run: npm install supabase

- name: Authenticate Supabase CLI
run: npx supabase login --token "${{ secrets.SUPABASE_ACCESS_TOKEN }}"

- name: Link Supabase Project
run: npx supabase link --project-ref "${{ secrets.SUPABASE_PROJECT_REF }}" --password "${{ secrets.SUPABASE_DB_PWD }}"

- name: Deploy migrations
run: npx supabase db push --password "${{ secrets.SUPABASE_DB_PWD }}" --include-all

- name: Deploy Edge Functions
run: |
if [ -d "supabase/functions" ] && [ "$(ls -A supabase/functions)" ]; then
npx supabase functions deploy
else
echo "No functions to deploy."
fi
Loading

0 comments on commit 52e75c2

Please sign in to comment.