Spaces:
Runtime error
Runtime error
Add github actions
Browse files- .github/workflows/file-size.yml +14 -0
- .github/workflows/hf-sync.yml +22 -0
.github/workflows/file-size.yml
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Check file size
|
| 2 |
+
on:
|
| 3 |
+
push:
|
| 4 |
+
branches: [main]
|
| 5 |
+
workflow_dispatch: # Allow maunal trigger
|
| 6 |
+
|
| 7 |
+
jobs:
|
| 8 |
+
check_file_size:
|
| 9 |
+
runs-on: ubuntu-latest
|
| 10 |
+
steps:
|
| 11 |
+
- name: Check large files
|
| 12 |
+
uses: ActionsDesk/[email protected]
|
| 13 |
+
with:
|
| 14 |
+
filesizelimit: 10485760
|
.github/workflows/hf-sync.yml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Sync with Hugging Face
|
| 2 |
+
on:
|
| 3 |
+
push:
|
| 4 |
+
branches: [main]
|
| 5 |
+
workflow_dispatch: # Allow maunal trigger
|
| 6 |
+
|
| 7 |
+
jobs:
|
| 8 |
+
sync:
|
| 9 |
+
runs-on: ubuntu-latest
|
| 10 |
+
steps:
|
| 11 |
+
- name: Checkout
|
| 12 |
+
uses: actions/checkout@v4t
|
| 13 |
+
with:
|
| 14 |
+
fetch-depth: 0
|
| 15 |
+
lfs: true
|
| 16 |
+
|
| 17 |
+
- name: Push to HF
|
| 18 |
+
env:
|
| 19 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 20 |
+
HF_USERNAME: ${{ vars.HF_USERNAME }}
|
| 21 |
+
HF_SPACE: ${{ vars.HF_SPACE }}
|
| 22 |
+
run: git push https://$HF_USERNAME:[email protected]/spaces/$HF_USERNAME/$HF_SPACE main
|