Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
cd5b559
1
Parent(s):
161580d
Add deployment to HF dev space
Browse files- .github/workflows/cd.yml +22 -0
- .github/workflows/ci.yml +9 -2
.github/workflows/cd.yml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Sync to Hugging Face hub
|
| 2 |
+
on:
|
| 3 |
+
push:
|
| 4 |
+
branches: [main]
|
| 5 |
+
pull_request:
|
| 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 |
+
environment: development
|
| 14 |
+
steps:
|
| 15 |
+
- uses: actions/checkout@v3
|
| 16 |
+
with:
|
| 17 |
+
fetch-depth: 0
|
| 18 |
+
lfs: true
|
| 19 |
+
- name: Push to hub
|
| 20 |
+
env:
|
| 21 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 22 |
+
run: git push https://HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/HF_ORGANIZATION/SPACE_NAME main
|
.github/workflows/ci.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
name:
|
| 2 |
on: [push, pull_request]
|
| 3 |
jobs:
|
| 4 |
docker-build:
|
|
@@ -6,4 +6,11 @@ jobs:
|
|
| 6 |
steps:
|
| 7 |
- name: Check out the repo
|
| 8 |
uses: actions/checkout@v4
|
| 9 |
-
- run: docker build .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Continuous integration
|
| 2 |
on: [push, pull_request]
|
| 3 |
jobs:
|
| 4 |
docker-build:
|
|
|
|
| 6 |
steps:
|
| 7 |
- name: Check out the repo
|
| 8 |
uses: actions/checkout@v4
|
| 9 |
+
- run: docker build .
|
| 10 |
+
check-files-size:
|
| 11 |
+
runs-on: ubuntu-latest
|
| 12 |
+
steps:
|
| 13 |
+
- name: Check large files
|
| 14 |
+
uses: ppremk/lfs-warning@v3.2
|
| 15 |
+
with:
|
| 16 |
+
filesizelimit: 10485760 # this is 10MB so we can sync to HF Spaces
|