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