-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (28 loc) · 1.17 KB
/
process_documents.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Process documents
on:
workflow_dispatch: {}
repository_dispatch:
types: [parla_process_documents]
jobs:
process_documents:
runs-on: ubuntu-latest
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
SUPABASE_DB_CONNECTION: ${{ secrets.SUPABASE_DB_CONNECTION }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_MODEL: ${{ vars.OPENAI_MODEL }}
OPENAI_EMBEDDING_MODEL: ${{ vars.OPENAI_EMBEDDING_MODEL }}
PROCESSING_DIR: ${{ vars.PROCESSING_DIR }}
ALLOW_DELETION: ${{ vars.ALLOW_DELETION }}
MAX_PAGES_LIMIT: ${{ vars.MAX_PAGES_LIMIT }}
MAX_DOCUMENTS_TO_PROCESS: ${{ vars.MAX_DOCUMENTS_TO_PROCESS }}
steps:
- name: checkout code
uses: actions/checkout@v2
- name: preparation
run: npm ci && mkdir -p processing_data && curl https://oxzjdwqsmpgqlrziuugr.supabase.co/storage/v1/object/public/assets/deu.traineddata > deu.traineddata && ls -all
- name: register documents
run: npx tsx ./src/run_import.ts
- name: process documents
run: export PROCESSING_DIR=$(pwd)/processing_data && npx tsx ./src/run_process.ts