chore(embeddings): github action poc

This commit is contained in:
Greg Richardson
2023-04-24 10:40:37 -06:00
parent 59caf7d1dd
commit 030ef17bf1
2 changed files with 38 additions and 1 deletions

View File

@@ -14,7 +14,7 @@ jobs:
env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
PROJECT_ID: ${{ secrets.PROJECT_ID }}
PROJECT_ID: ${{ secrets.OG_IMAGE_SUPABASE_PROJECT_ID }}
steps:
- name: Check out repo

37
.github/workflows/search.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Generate Embeddings for Search
on:
push:
branches:
- master
paths:
- 'apps/docs/**'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
env:
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
PROJECT_ID: ${{ secrets.SEARCH_SUPABASE_PROJECT_ID }}
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.SEARCH_SUPABASE_URL }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SEARCH_SUPABASE_SERVICE_ROLE_KEY }}
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Download dependencies
working-directory: ./apps/docs
run: npm ci
- name: Refresh embeddings
working-directory: ./apps/docs
run: npx run embeddings