-
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.
Merge pull request #11 from ghost-in-the-machine-llc/supabase-edge-fn
Testing new workflow on staging push
- Loading branch information
Showing
5 changed files
with
101 additions
and
26 deletions.
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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,30 @@ | ||
name: Deploy Supabase | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
project-id: | ||
required: true | ||
type: string | ||
secrets: | ||
token: | ||
required: true | ||
db-password: | ||
required: true | ||
|
||
jobs: | ||
deploy-staging: | ||
name: Setup & Deploy Supabase to Production | ||
runs-on: ubuntu-latest | ||
env: | ||
SUPABASE_ACCESS_TOKEN: ${{ secrets.token }} | ||
SUPABASE_DB_PASSWORD: ${{ secrets.db-password }} | ||
SUPABASE_PROJECT_ID: ${{ inputs.project-id }} | ||
|
||
steps: | ||
- name: Log Info | ||
run: | | ||
echo "project: $SUPABASE_PROJECT_ID" | ||
echo "token: $SUPABASE_ACCESS_TOKEN" | ||
echo "db-pwd: $SUPABASE_ACCESS_TOKEN" | ||
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 Supabase | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
project-id: | ||
required: true | ||
type: string | ||
secrets: | ||
token: | ||
required: true | ||
db-password: | ||
required: true | ||
|
||
jobs: | ||
deploy-staging: | ||
name: Setup & Deploy Supabase to Production | ||
runs-on: ubuntu-latest | ||
env: | ||
SUPABASE_ACCESS_TOKEN: ${{ secrets.token }} | ||
SUPABASE_DB_PASSWORD: ${{ secrets.db-password }} | ||
SUPABASE_PROJECT_ID: ${{ inputs.project-id }} | ||
|
||
steps: | ||
- name: Log Project | ||
run: echo "Deploying Supabase to $SUPABASE_PROJECT_ID" | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- uses: supabase/setup-cli@v1 | ||
with: | ||
version: latest | ||
|
||
- name: Deploy Functions | ||
run: supabase functions deploy --project-ref $SUPABASE_PROJECT_ID #this may work w/o flag |
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,35 @@ | ||
name: Spirit Wave AI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
run-ci: | ||
name: Run CI | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js 20 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Use Deno v1 latest | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: v1.x | ||
|
||
- run: npm ci | ||
- run: npm run lint | ||
|
||
deploy: | ||
if: github.ref_name == 'staging' | ||
name: Deploy to Staging | ||
uses: "./.github/workflows/deploy-test.yml" | ||
with: | ||
project-id: ${{ vars.STAGING_SUPABASE_PROJECT_ID}} | ||
secrets: | ||
token: ${{ secrets.SUPABASE_ACCESS_TOKEN }} | ||
db-password: ${{ secrets.STAGING_SUPABASE_DB_PASSWORD }} |