Skip to content

Commit

Permalink
fix bug in gh actions by having separate steps for deploy staging v prod
Browse files Browse the repository at this point in the history
  • Loading branch information
martypdx committed Nov 6, 2023
1 parent 1e462d1 commit 3d575eb
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/spiritwave-ai.yml
Expand Up @@ -28,13 +28,24 @@ jobs:
- run: npm run lint:ts
name: Lint supabase/functions

deploy:
if: github.ref_name == 'staging' || github.ref_name == 'main'
deploy-staging:
if: github.ref_name == 'staging'
needs: run-ci
name: Deployment Check
uses: ./.github/workflows/deploy.yml
with:
project-id: ${{ github.ref_name == 'main' && vars.SUPABASE_PROJECT_ID || vars.STAGING_SUPABASE_PROJECT_ID}}
project-id: ${{ vars.STAGING_SUPABASE_PROJECT_ID}}
secrets:
token: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
db-password: ${{ github.ref_name == 'main' && secrets.SUPABASE_DB_PASSWORD || secrets.STAGING_SUPABASE_DB_PASSWORD}}
db-password: ${{ secrets.STAGING_SUPABASE_DB_PASSWORD}}

deploy-production:
if: github.ref_name == 'main'
needs: run-ci
name: Deployment Check
uses: ./.github/workflows/deploy.yml
with:
project-id: ${{ vars.SUPABASE_PROJECT_ID }}
secrets:
token: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
db-password: ${{ secrets.SUPABASE_DB_PASSWORD }}

0 comments on commit 3d575eb

Please sign in to comment.