name: Sync to Hugging Face on: push: branches: [main] # Allows you to click a button to sync manually if needed workflow_dispatch: jobs: sync-to-hub: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 lfs: true - name: Push to Hub env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | git config --global user.email "Jaykay73@users.noreply.github.com" git config --global user.name "Jaykay73" # Add the Hugging Face remote git remote add space https://Jaykay73:$HF_TOKEN@huggingface.co/spaces/Jaykay73/match-api # Force push to ensure they match exactly git push --force space main