Skip to content

Commit d26ba72

Browse files
Add workflow to sync code to Hugging Face Hub
1 parent cf254ef commit d26ba72

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/sync_to_hf.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Sync to Hugging Face Hub
2+
3+
on:
4+
push:
5+
branches: [main]
6+
# Allows you to run this workflow manually from the Actions tab
7+
workflow_dispatch:
8+
9+
jobs:
10+
sync-to-hub:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
lfs: true
18+
19+
- name: Push to Hub
20+
env:
21+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
22+
run: |
23+
# Force push to the 'main' branch of your Hugging Face Space
24+
git push -f https://asksunny:$HF_TOKEN@huggingface.co/spaces/asksunny/Compileo main

0 commit comments

Comments
 (0)