Spaces:
Paused
Paused
| name: Sync Knowledge (GitHub → Supabase/pgvector) | |
| on: | |
| schedule: | |
| - cron: "17 */6 * * *" # every 6h | |
| workflow_dispatch: | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run sync script | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
| SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} | |
| KNOWLEDGE_REPO_URL: ${{ secrets.KNOWLEDGE_REPO_URL }} | |
| KNOWLEDGE_DIRS: ${{ secrets.KNOWLEDGE_DIRS }} | |
| run: | | |
| node scripts/sync-knowledge.mjs | |