Spaces:
Running
Running
name: Sync to Hugging Face Hub | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
sync-to-hub: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions Bot" | |
- name: Ensure large files are ignored | |
run: | | |
echo "app/models/chroma/data/chroma.sqlite3" >> .gitignore | |
echo "models/chroma/data/chroma.sqlite3" >> .gitignore | |
git add .gitignore | |
git commit -m "Ignore large sqlite3 files" || echo "No changes to commit" | |
- name: Push to Hub | |
env: | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
run: | | |
git remote set-url origin https://Oxbridge-Economics:[email protected]/spaces/Oxbridge-Economics/Mailbox | |
git push origin main --force |