generated from digitalaidseattle/das-admin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added student table, cicd to supabase, example to query from supabase
- Loading branch information
1 parent
cda6699
commit 8e8000a
Showing
6 changed files
with
413 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
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: '16' | ||
|
||
- name: Install Supabase CLI | ||
run: npm install -g supabase | ||
|
||
- name: Authenticate Supabase CLI | ||
run: supabase login --token "${{ secrets.SUPABASE_ACCESS_TOKEN }}" | ||
|
||
- name: Link Supabase Project | ||
run: supabase link --project-ref "${{ secrets.SUPABASE_PROJECT_REF }}" --password "${{ secrets.SUPABASE_DB_PWD }}" | ||
- name: Deploy migrations | ||
run: supabase db push | ||
|
||
- name: Deploy Edge Functions | ||
run: | | ||
if [ -d "supabase/functions" ] && [ "$(ls -A supabase/functions)" ]; then | ||
supabase functions deploy | ||
else | ||
echo "No functions to deploy." | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Deploy to Supabase on PR | ||
|
||
on: pull_request | ||
name: Deploy to Supabase on merge | ||
|
||
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: '16' | ||
|
||
- name: Install Supabase CLI | ||
run: npm install -g supabase | ||
|
||
- name: Authenticate Supabase CLI | ||
run: supabase login --token "${{ secrets.SUPABASE_ACCESS_TOKEN }}" | ||
|
||
- name: Link Supabase Project | ||
run: supabase link --project-ref "${{ secrets.SUPABASE_PROJECT_REF }}" --password "${{ secrets.SUPABASE_DB_PWD }}" | ||
- name: Deploy migrations | ||
run: supabase db push | ||
|
||
- name: Deploy Edge Functions | ||
run: | | ||
if [ -d "supabase/functions" ] && [ "$(ls -A supabase/functions)" ]; then | ||
supabase functions deploy | ||
else | ||
echo "No functions to deploy." | ||
fi |
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
Oops, something went wrong.