sachin1801 commited on
Commit
f204468
·
1 Parent(s): e739c81

Fix HF deploy: remove splicing.db from history entirely

Browse files

Use git-filter-repo to remove webapp/splicing.db from all commits
before migrating to LFS. This prevents HF from rejecting large files
in historical commits.

Files changed (1) hide show
  1. .github/workflows/deploy-hf.yml +7 -9
.github/workflows/deploy-hf.yml CHANGED
@@ -16,22 +16,20 @@ jobs:
16
  run: |
17
  git lfs install
18
 
19
- - name: Migrate large files to LFS
20
  run: |
21
- git lfs migrate import --include="*.pkl.gz,*.zip,*.pdf,*.xlsx,*.xls,*.h5,*.csv.gz" --everything --yes
 
 
 
22
 
23
- - name: Clean up orphaned LFS references
24
  run: |
25
- # Remove any .db files from LFS tracking (they're cache files)
26
- git lfs untrack "*.db" || true
27
- rm -f webapp/splicing.db
28
- git add -A
29
- git commit -m "Clean LFS references" --allow-empty || true
30
 
31
  - name: Push to Hugging Face
32
  env:
33
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
34
  run: |
35
  git remote add hf https://sachin1801:${HF_TOKEN}@huggingface.co/spaces/sachin1801/splicing-predictor || true
36
- git config lfs.allowincompletepush true
37
  git push hf main --force
 
16
  run: |
17
  git lfs install
18
 
19
+ - name: Remove splicing.db from history
20
  run: |
21
+ # Install git-filter-repo
22
+ pip install git-filter-repo
23
+ # Remove webapp/splicing.db from entire history (it's a cache file)
24
+ git filter-repo --path webapp/splicing.db --invert-paths --force
25
 
26
+ - name: Migrate large files to LFS
27
  run: |
28
+ git lfs migrate import --include="*.pkl.gz,*.zip,*.pdf,*.xlsx,*.xls,*.h5,*.csv.gz" --everything --yes
 
 
 
 
29
 
30
  - name: Push to Hugging Face
31
  env:
32
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
33
  run: |
34
  git remote add hf https://sachin1801:${HF_TOKEN}@huggingface.co/spaces/sachin1801/splicing-predictor || true
 
35
  git push hf main --force