llm-arena / .github /workflows /deploy.yml
IntimateUser6969's picture
feat: add Pinecone hybrid memory backend and HF Spaces deployment
6a7d296
Raw
History Blame Contribute Delete
1.4 kB
name: Test and Deploy to HF Spaces
on:
push:
branches:
- main
- Refractoring-Scale
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run tests
env:
GROQ_API_KEY: dummy-key-for-testing
OPENAI_API_KEY: ""
HF_TOKEN: ""
PINECONE_API_KEY: ""
PINECONE_INDEX_NAME: llm-arena-memory
USE_PINECONE: "False"
USE_MODAL: "False"
run: pytest tests/ -v --tb=short --no-header
deploy:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/Refractoring-Scale'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Push to HuggingFace Spaces
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git config user.email "ci@github-actions"
git config user.name "GitHub Actions"
git remote add hf https://IntimateUser6969:${HF_TOKEN}@huggingface.co/spaces/IntimateUser6969/llm-arena || true
git push hf HEAD:main --force