AgriAssist_LLM / .github /workflows /sync_to_hf.yml
AdityaAdaki
binary cover photo issue fixed
61f193b
raw
history blame contribute delete
850 Bytes
name: Sync to Hugging Face Hub
on:
push:
branches: [main]
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Add Hugging Face remote
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git remote add hf https://sikeaditya:$HF_TOKEN@huggingface.co/sikeaditya/AgriAssist_LLM || true
git fetch hf
- name: Restore Hugging Face README (if needed)
run: |
git checkout hf/main -- README.md || echo "No README.md in HF repo"
- name: Remove binary files not needed on Hugging Face
run: rm -f "cover photo.png"
- name: Push to Hugging Face
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: git push --force hf main