generated from blockmatic-icebox/powerstack
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90d8586
commit 546ccf8
Showing
1 changed file
with
15 additions
and
25 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 |
---|---|---|
@@ -1,36 +1,26 @@ | ||
name: Supabase Migrations | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # Adjust this to your main development branch | ||
paths: | ||
- 'apps/supabase/**' # Adjust this path to where your Supabase project is located in the monorepo | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Supabase CLI | ||
run: | | ||
curl -L https://github.com/supabase/cli/releases/latest/download/supabase_linux -o /tmp/supabase | ||
chmod +x /tmp/supabase | ||
env: | ||
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} | ||
SUPABASE_DB_PASSWORD: ${{ secrets.PRODUCTION_DB_PASSWORD }} | ||
SUPABASE_PROJECT_ID: ${{ secrets.PRODUCTION_PROJECT_ID }} | ||
|
||
- name: Link Supabase Project | ||
run: /tmp/supabase link --project-ref kvdrzfyetdzigjkmgwgn --anon-key "$SUPABASE_ANON_KEY" --service-role-key "$SUPABASE_SERVICE_ROLE_KEY" | ||
env: | ||
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }} | ||
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} | ||
working-directory: ./apps/supabase | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Deploy Edge Functions | ||
run: /tmp/supabase functions deploy --env production | ||
working-directory: ./apps/supabase | ||
- uses: supabase/setup-cli@v1 | ||
with: | ||
version: latest | ||
|
||
- name: Run DB Migrations | ||
run: /tmp/supabase db push --env production | ||
working-directory: ./apps/supabase | ||
- run: supabase link --project-ref $SUPABASE_PROJECT_ID | ||
- run: supabase db push |