Daily Document Update #76
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Daily Document Update | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Runs at 00:00 UTC every day | |
workflow_dispatch: # Allows manual trigger | |
jobs: | |
update-embeddings: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Create service account key file | |
run: | | |
echo '${{ secrets.GOOGLE_DRIVE_CREDENTIALS }}' > service_account.json | |
- name: Run update script | |
env: | |
SUPABASE_HOST: ${{ secrets.SUPABASE_HOST }} | |
SUPABASE_PASSWORD: ${{ secrets.SUPABASE_PASSWORD }} | |
run: | | |
python update_embeddings.py | |
- name: Clean up | |
if: always() | |
run: rm -f service_account.json |