YamenRM commited on
Commit
e6daf61
·
unverified ·
1 Parent(s): e58ae81

Update workflow to upload to Hugging Face

Browse files
Files changed (1) hide show
  1. .github/workflows/sync.yml +15 -17
.github/workflows/sync.yml CHANGED
@@ -1,18 +1,16 @@
1
- name: Sync to Hugging Face
2
- on:
3
- push:
4
- branches: [main]
5
- jobs:
6
- sync-to-hub:
7
- runs-on: ubuntu-latest
8
- steps:
9
- - uses: actions/checkout@v3
10
- with:
11
- fetch-depth: 0
12
- lfs: true
13
- - name: Push to hub
14
- env:
15
- HF_TOKEN: ${{ secrets.HF_TOKEN }}
16
- run: git push -f https://YamenRM:$HF_TOKEN@huggingface.co/spaces/YamenRM/workflow-analyzer main
17
-
18
 
 
 
 
 
 
 
 
 
1
+ - name: Upload to Hugging Face
2
+ env:
3
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
4
+ run: |
5
+ pip install huggingface_hub
6
+ python - <<EOF
7
+ from huggingface_hub import upload_folder
8
+ import os
 
 
 
 
 
 
 
 
 
9
 
10
+ upload_folder(
11
+ folder_path='.',
12
+ repo_id='YamenRM/workflow-analyzer',
13
+ repo_type='space',
14
+ token=os.environ['HF_TOKEN']
15
+ )
16
+ EOF