Skip to content

Commit

Permalink
Merge pull request #12 from ghost-in-the-machine-llc/staging
Browse files Browse the repository at this point in the history
Deploy staging to prod test
  • Loading branch information
martypdx committed Oct 31, 2023
2 parents 2771788 + a8b5b10 commit c82ba23
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 80 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/ci.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/deploy-production.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/deploy-staging.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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 }}
PROJECT_ID: ${{ inputs.project-id }}

steps:
- name: Log deployment info
run: |
echo Deploying Supabase from ${{ github.ref_name }} to project id $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 $PROJECT_ID
40 changes: 40 additions & 0 deletions .github/workflows/spiritwave-ai.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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
name: Install CI dependencies
- run: npm run lint:js
name: Lint www
- run: npm run lint:ts
name: Lint supabase/functions

deploy:
if: github.ref_name == 'staging' || github.ref_name == 'main'
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}}
secrets:
token: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
db-password: ${{ github.ref_name == 'main' && secrets.SUPABASE_DB_PASSWORD || secrets.STAGING_SUPABASE_DB_PASSWORD}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"start": "supabase start; supabase functions serve",
"lint": "npm run lint:js; npm run lint:ts",
"lint": "npm run lint:js && npm run lint:ts",
"lint:js": "npm run lint -w www",
"lint:ts": "deno lint",
"secrets:deploy": "supabase secrets set --env-file ./supabase/functions/.env --project-ref zekxhqiqlnzydflpmddi",
Expand Down
4 changes: 2 additions & 2 deletions supabase/functions/_prompts/instructions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const CENTER = {
help them find their center and connect with their own unique divine spark (they have a unique essence other
than King Marvin, no need to mention this, refer to their divine essence generally) to feel connected and empowered.
Limit your total response to 80 characters.
Limit your total response to 200 characters.
`,
};

Expand Down Expand Up @@ -82,7 +82,7 @@ export const INVOCATION = {
connect to each of your directions again by describing your song and the
feelings it invokes as you sing it.
Limit your total response to 80 characters.
Limit your total response to 200 characters.
`,
};

0 comments on commit c82ba23

Please sign in to comment.