-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.14 KB
/
rag-ingest.yml
File metadata and controls
47 lines (40 loc) · 1.14 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: RAG Ingestion
on:
push:
branches:
- main
paths:
- "content/**"
workflow_dispatch:
jobs:
ingest:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
- name: Run Ingestion Script
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_VECTORIZE_INDEX_NAME: "blog-index"
run: |
python scripts/ingest.py
- name: Commit State File
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .ingest_state.json
git diff --staged --quiet || git commit -m "🤖 Update RAG ingestion state"
git push