marintosti12 commited on
Commit
7ea6ddc
·
1 Parent(s): bf38803

fix(deploy) : binaries files

Browse files
Files changed (1) hide show
  1. .github/workflows/deploy.yaml +12 -5
.github/workflows/deploy.yaml CHANGED
@@ -38,15 +38,22 @@ jobs:
38
  echo "HF secrets manquants, on skip le déploiement."
39
  exit 0
40
 
41
- - name: Prepare snapshot (no binaries)
42
  shell: bash
43
  run: |
44
- # Ignore les artefacts ML (au cas )
 
 
 
 
 
 
45
  printf "\n# ML artifacts\n*.joblib\n*.pkl\n*.pt\n*.onnx\n" >> .gitignore
46
- git rm -r --cached notebook/*.joblib || true
47
 
48
- # Crée une branche SANS historique avec l'état courant
49
- git switch --orphan hfdeploy
 
 
50
  git add -A
51
  git commit -m "Space deploy snapshot ${GITHUB_SHA}"
52
 
 
38
  echo "HF secrets manquants, on skip le déploiement."
39
  exit 0
40
 
41
+ - name: Prepare snapshot (no history, no binaries)
42
  shell: bash
43
  run: |
44
+ # 1) Crée une branche orpheline (il faut un working tree clean)
45
+ git switch --orphan hfdeploy
46
+
47
+ # 2) Réinitialise l'index pour repartir propre sur l'état du working tree
48
+ git reset
49
+
50
+ # 3) Ajoute les patterns d'ignore AVANT de stagier les fichiers
51
  printf "\n# ML artifacts\n*.joblib\n*.pkl\n*.pt\n*.onnx\n" >> .gitignore
 
52
 
53
+ # 4) (optionnel) si un .joblib est déjà indexé, enlève-le sans erreur si pas de match
54
+ git rm -r --cached --ignore-unmatch -- notebook/*.joblib
55
+
56
+ # 5) Stage tout ce qui n’est pas ignoré et commit la snapshot
57
  git add -A
58
  git commit -m "Space deploy snapshot ${GITHUB_SHA}"
59