Skip to content

Commit

Permalink
separate ci and staging and production deploy workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
martypdx committed Oct 30, 2023
1 parent 0dffb25 commit 14e5eb6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
name: SpiritWave CI
name: CI

on: [push, pull_request]

env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}
PROJECT_ID: ${{ vars.SUPABASE_PROJECT_ID}}

jobs:
run-ci:
name: Lint project and deploy functions
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy to Production

on:
push:
branches: main

env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}
PROJECT_ID: ${{ vars.SUPABASE_PROJECT_ID}}

jobs:
deploy-staging:
name: Setup & Deploy Supabase to Production
runs-on: ubuntu-latest

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

- uses: supabase/setup-cli@v1
with:
version: latest

- name: Deploy Functions
run: supabase functions deploy --project-ref $PROJECT_ID
3 changes: 0 additions & 3 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Deploy to Staging

on:
Expand Down

0 comments on commit 14e5eb6

Please sign in to comment.