AnayShukla's picture
Claude Opus 5
Fetch all LFS objects before syncing to the Space
8d20384
Raw History Blame Contribute Delete
1.01 kB
name: Sync to Hugging Face
on:
push:
branches: [main, master]
jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
# actions/checkout with lfs:true fetches the LFS objects for the checked
# out commit only. The push below sends every commit the Space is behind
# by, and each one that touched team_totals.xlsx carries its own object,
# so a push spanning more than one such commit fails with
# Git LFS upload failed: (missing) team_totals.xlsx (<oid>)
# naming an INTERMEDIATE commit's object. Single-commit pushes hid this.
# Fetch every object in history before pushing.
- name: Fetch all LFS objects
run: git lfs fetch --all origin
- name: Push to Hugging Face
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: git push --force https://AnayShukla:${HF_TOKEN}@huggingface.co/spaces/AnayShukla/fpl-solver HEAD:main