name: Sync to Hugging Face Space on: push: branches: - main jobs: sync: runs-on: ubuntu-latest steps: - name: Checkout GitHub Repository uses: actions/checkout@v3 with: fetch-depth: 0 # Fetch the entire history to avoid shallow clone issues - name: Install Git LFS run: | curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash sudo apt-get install git-lfs git lfs install - name: Configure Git run: | git config --global user.name "GitHub Actions Bot" git config --global user.email "actions@github.com" - name: Push to Hugging Face env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | git remote add huggingface https://user:${HF_TOKEN}@huggingface.co/spaces/SE-Arena/Software-Engineering-Arena git fetch huggingface git push huggingface main --force