Skip to content

Commit 88c21f0

Browse files
committed
copilot modif
1 parent 9d629c9 commit 88c21f0

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/deploy-to-hf.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- update-hf-deploy
78
workflow_dispatch:
89

910
jobs:
@@ -22,9 +23,9 @@ jobs:
2223
git config user.email "ci@github.actions"
2324
git config user.name "github-actions[bot]"
2425
25-
mv README.md README.project.md
26+
original_readme="$(cat README.md)"
2627
27-
cat << 'EOF' > README.md
28+
cat > README.md <<EOF
2829
---
2930
title: AI Agent
3031
emoji: 🤖
@@ -35,19 +36,17 @@ jobs:
3536
pinned: false
3637
---
3738
39+
$original_readme
3840
EOF
3941
40-
cat README.project.md >> README.md
41-
4242
rm -rf assets
4343
4444
git checkout --orphan hf-deploy
45-
git reset
4645
4746
git add -A
4847
git commit -m "Deploy to Hugging Face Space"
4948
50-
- name: Push to HF Space from branch
49+
- name: Push to HF Space
5150
env:
5251
HF_TOKEN: ${{ secrets.HF_TOKEN }}
5352
run: |

0 commit comments

Comments
 (0)