Skip to content

Update Knowledge Base #1

Update Knowledge Base

Update Knowledge Base #1

Workflow file for this run

name: Update Knowledge Base
on:
# push:
# branches: [main]
# paths:
# - 'data/**'
workflow_dispatch:
jobs:
ingest:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install --upgrade pip
pip install \
sentence-transformers==3.2.1 \
chromadb==0.5.20 \
langchain==0.3.7 \
langchain-community==0.3.7 \
pypdf==5.1.0 \
pandas==2.2.3 \
tiktoken==0.8.0
- name: Run ingest pipeline
run: python scripts/ingest.py --data-dir data/ --chroma-dir chroma_db/
- name: Commit updated ChromaDB
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add chroma_db/
git diff --cached --quiet || git commit -m "chore: update ChromaDB knowledge base [skip ci]"
git push