Thomas Gardos
commited on
Commit
·
9da621d
1
Parent(s):
e8a9670
Updated actions
Browse filesRevised push to HF action to follow instructions at
https://github.com/huggingface/hub-docs/blob/main/docs/hub/spaces-github-actions.md
Added check file size action which will warn you if you are checking a file >10MB so
you can start tracking it in git lfs.
.github/workflows/check_file_size.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Check file size
|
| 2 |
+
on: # or directly `on: [push]` to run the action on every push on any branch
|
| 3 |
+
pull_request:
|
| 4 |
+
branches: [main, dev_branch]
|
| 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 |
+
- name: Check large files
|
| 14 |
+
uses: ActionsDesk/[email protected]
|
| 15 |
+
with:
|
| 16 |
+
filesizelimit: 10485760 # this is 10MB so we can sync to HF Spaces
|
.github/workflows/push_to_hf_space_prototype.yml
CHANGED
|
@@ -1,20 +1,21 @@
|
|
| 1 |
name: Push Prototype to HuggingFace
|
| 2 |
|
| 3 |
on:
|
| 4 |
-
|
| 5 |
-
branches:
|
| 6 |
-
|
| 7 |
-
|
|
|
|
| 8 |
|
| 9 |
jobs:
|
| 10 |
-
|
| 11 |
runs-on: ubuntu-latest
|
| 12 |
steps:
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
| 1 |
name: Push Prototype to HuggingFace
|
| 2 |
|
| 3 |
on:
|
| 4 |
+
push:
|
| 5 |
+
branches: [dev_branch]
|
| 6 |
+
|
| 7 |
+
# run this workflow manuall from the Actions tab
|
| 8 |
+
workflow_dispatch:
|
| 9 |
|
| 10 |
jobs:
|
| 11 |
+
sync-to-hub:
|
| 12 |
runs-on: ubuntu-latest
|
| 13 |
steps:
|
| 14 |
+
- uses: actions/checkout@v3
|
| 15 |
+
with:
|
| 16 |
+
fetch-depth: 0
|
| 17 |
+
lfs: true
|
| 18 |
+
- name: Deploy Prototype to HuggingFace
|
| 19 |
+
env:
|
| 20 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 21 |
+
run: git push https://trgardos:$HF_TOKEN@huggingface.co/spaces/dl4ds/tutor_dev main
|