DocIntel / .github /workflows /deploy.yml
Rupali Ravindra Shetye
Fix auto-deploy workflow with full history fetch
e2d61cd
Raw History Blame Contribute Delete
866 Bytes
name: Deploy to Hugging Face
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code with full history
uses: actions/checkout@v3
with:
fetch-depth: 0 # This fixes the shallow update error
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Hugging Face CLI
run: |
pip install huggingface-hub
- name: Deploy to Hugging Face
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git remote add hf https://ShetyeRupa:$HF_TOKEN@huggingface.co/spaces/ShetyeRupa/DocIntel
git push hf main --force