Spaces:
Build error
Build error
Commit
·
300ee92
1
Parent(s):
4ad48e3
Add Hugging Face Spaces sync workflow
Browse files
.github/workflows/huggingface-spaces-sync.yml
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Sync to Hugging Face Spaces
|
| 2 |
+
on:
|
| 3 |
+
push:
|
| 4 |
+
branches: [main]
|
| 5 |
+
|
| 6 |
+
jobs:
|
| 7 |
+
sync:
|
| 8 |
+
runs-on: ubuntu-latest
|
| 9 |
+
steps:
|
| 10 |
+
- uses: actions/checkout@v3
|
| 11 |
+
with:
|
| 12 |
+
fetch-depth: 0
|
| 13 |
+
lfs: true
|
| 14 |
+
|
| 15 |
+
- name: Setup Git LFS
|
| 16 |
+
run: |
|
| 17 |
+
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
|
| 18 |
+
sudo apt-get install git-lfs
|
| 19 |
+
git lfs install
|
| 20 |
+
|
| 21 |
+
- name: Push to Hugging Face Spaces
|
| 22 |
+
env:
|
| 23 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 24 |
+
run: |
|
| 25 |
+
git config --global user.email "[email protected]"
|
| 26 |
+
git config --global user.name "GitHub Actions"
|
| 27 |
+
git remote add hf https://tony-42069:[email protected]/spaces/tony-42069/cre-chatbot-rag
|
| 28 |
+
git fetch hf
|
| 29 |
+
git lfs push --all hf main
|
| 30 |
+
git push -f hf main
|