Skip to content

Commit 7d74595

Browse files
committed
Fix CI/CD workflow deployment to Hugging Face
- Add fetch-depth: 0 for full git history - Remove existing hf remote before adding to avoid conflicts - Improve deployment reliability
1 parent 9f418bf commit 7d74595

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/ci-cd.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ except Exception as e:
7070
steps:
7171
- name: Checkout code
7272
uses: actions/checkout@v4
73+
with:
74+
fetch-depth: 0
7375

7476
- name: Deploy to Hugging Face Spaces
7577
env:
@@ -79,7 +81,8 @@ except Exception as e:
7981
git config --global user.email "github-actions[bot]@users.noreply.github.com"
8082
git config --global user.name "github-actions[bot]"
8183
82-
# Add Hugging Face remote
84+
# Add Hugging Face remote (remove if exists)
85+
git remote remove hf || true
8386
git remote add hf https://nellaivijay:$HF_TOKEN@huggingface.co/spaces/nellaivijay/research-assistant.git
8487
8588
# Push to Hugging Face

0 commit comments

Comments
 (0)