Spaces:
Sleeping
Sleeping
| name: Deploy to Hugging Face Spaces | |
| on: | |
| push: | |
| branches: | |
| - main # Change this if your default branch is different | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 # Fetch the entire history of the repository | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| pip install huggingface_hub | |
| - name: Configure huggingface-cli | |
| run: | | |
| huggingface-cli login --token ${{ secrets.HF_TOKEN }} | |
| - name: Set up Git | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Add Hugging Face remote | |
| run: | | |
| git remote add huggingface https://huggingface:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/Abdullraffayy/Brc_challenges_ | |
| - name: Fetch and reset to main | |
| run: | | |
| git fetch huggingface | |
| git reset --hard origin/main | |
| - name: Remove LFS tracking for missing file | |
| run: | | |
| git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch data.parquet' -- --all | |
| - name: Push to Hugging Face Hub | |
| run: | | |
| git push huggingface main --force |