Skip to content

Commit cfc17b5

Browse files
committed
Add github action - sync to Hugging Face Space
1 parent b85c571 commit cfc17b5

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/filesize.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Check file size
2+
on:
3+
# pull_request:
4+
push:
5+
branches: [main]
6+
7+
# to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
jobs:
11+
sync-to-hub:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check large files
15+
uses: ActionsDesk/lfs-warning@v2.0
16+
with:
17+
filesizelimit: 10485760 # this is 10MB so we can sync to HF Spaces

.github/workflows/sync_HFSpace.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Sync to Hugging Face hub
2+
on:
3+
push:
4+
branches: [main]
5+
6+
# 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+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
lfs: true
17+
- name: Push to hub
18+
env:
19+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
20+
run: git push https://cvachet:$HF_TOKEN@huggingface.co/spaces/cvachet/object_detection_lambda main

0 commit comments

Comments
 (0)