Spaces:
Sleeping
Sleeping
Commit ·
a847466
1
Parent(s): 34d69c4
Update deploy-to-hf.yml
Browse files
.github/workflows/deploy-to-hf.yml
CHANGED
|
@@ -12,12 +12,15 @@ jobs:
|
|
| 12 |
steps:
|
| 13 |
- name: Checkout repository
|
| 14 |
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
- name: Install git-lfs
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
|
| 22 |
- name: Configure git
|
| 23 |
run: |
|
|
@@ -29,17 +32,17 @@ jobs:
|
|
| 29 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 30 |
HF_SPACE_ID: ${{ secrets.HF_SPACE_ID }}
|
| 31 |
run: |
|
| 32 |
-
# Clone the HF Space inside the GitHub Actions runner
|
| 33 |
-
git clone https://:${HF_TOKEN}@huggingface.co/spaces/${HF_SPACE_ID} hf-space
|
| 34 |
-
|
| 35 |
-
# Copy your repo content into the HF space repo
|
| 36 |
-
rsync -av --delete \
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
cd hf-space
|
| 42 |
-
git add .
|
| 43 |
-
git commit -m "Auto-deploy from GitHub main" || echo "Nothing to commit"
|
| 44 |
-
git push origin main
|
| 45 |
-
|
|
|
|
| 12 |
steps:
|
| 13 |
- name: Checkout repository
|
| 14 |
uses: actions/checkout@v4
|
| 15 |
+
with:
|
| 16 |
+
fetch-depth: 0
|
| 17 |
+
lfs: true
|
| 18 |
|
| 19 |
+
# - name: Install git-lfs
|
| 20 |
+
# run: |
|
| 21 |
+
# sudo apt-get update
|
| 22 |
+
# sudo apt-get install -y git-lfs
|
| 23 |
+
# git lfs install
|
| 24 |
|
| 25 |
- name: Configure git
|
| 26 |
run: |
|
|
|
|
| 32 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 33 |
HF_SPACE_ID: ${{ secrets.HF_SPACE_ID }}
|
| 34 |
run: |
|
| 35 |
+
# # Clone the HF Space inside the GitHub Actions runner
|
| 36 |
+
# git clone https://:${HF_TOKEN}@huggingface.co/spaces/${HF_SPACE_ID} hf-space
|
| 37 |
+
|
| 38 |
+
# # Copy your repo content into the HF space repo
|
| 39 |
+
# rsync -av --delete \
|
| 40 |
+
# --exclude ".git" \
|
| 41 |
+
# --exclude ".github" \
|
| 42 |
+
# ./ hf-space/
|
| 43 |
+
|
| 44 |
+
# cd hf-space
|
| 45 |
+
# git add .
|
| 46 |
+
# git commit -m "Auto-deploy from GitHub main" || echo "Nothing to commit"
|
| 47 |
+
# git push origin main
|
| 48 |
+
git push https://:${HF_TOKEN}@huggingface.co/spaces/${HF_SPACE_ID} main
|