berangerthomas commited on
Commit
b13952f
·
1 Parent(s): 17ed8db

Maj sync hugging face

Browse files
.github/workflows/sync-huggingface.yml CHANGED
@@ -1,17 +1,18 @@
1
- name: Sync to Hugging Face Hub
2
  on:
3
  push:
4
  branches: [main]
 
5
 
6
  jobs:
7
  sync-to-hub:
8
  runs-on: ubuntu-latest
9
  steps:
10
  - uses: actions/checkout@v3
11
- - name: Push to HF Hub
 
 
 
12
  env:
13
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
14
- run: |
15
- pip install huggingface_hub
16
- python -c "from huggingface_hub import HfApi; HfApi().create_repo('${{ github.repository }}', repo_type='model', private=False)"
17
- python -c "from huggingface_hub import HfApi; HfApi().upload_folder(folder_path='.', repo_id='${{ github.repository }}', repo_type='model')"
 
1
+ name: Sync to Hugging Face hub
2
  on:
3
  push:
4
  branches: [main]
5
+ workflow_dispatch:
6
 
7
  jobs:
8
  sync-to-hub:
9
  runs-on: ubuntu-latest
10
  steps:
11
  - uses: actions/checkout@v3
12
+ with:
13
+ fetch-depth: 0
14
+ lfs: true
15
+ - name: Push to hub
16
  env:
17
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
18
+ run: git push https://berangerthomas:$HF_TOKEN@huggingface.co/spaces/berangerthomas/topicminer main