Spaces:
Running
Running
Corrected Github Actions yaml
Browse files- .github/workflows/check.yaml +16 -0
- .github/workflows/deploy.yaml +13 -21
.github/workflows/check.yaml
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]
|
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/deploy.yaml
CHANGED
@@ -1,28 +1,20 @@
|
|
1 |
-
name:
|
2 |
-
|
3 |
on:
|
4 |
push:
|
5 |
-
branches: [
|
|
|
|
|
|
|
6 |
|
7 |
jobs:
|
8 |
-
|
9 |
runs-on: ubuntu-latest
|
10 |
-
|
11 |
steps:
|
12 |
-
- uses: actions/checkout@
|
13 |
-
with:
|
14 |
-
fetch-depth: 0
|
15 |
-
|
16 |
-
- name: Push
|
17 |
env:
|
18 |
-
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
19 |
-
run:
|
20 |
-
git config --global user.email "[email protected]"
|
21 |
-
git config --global user.name "github-ci"
|
22 |
-
|
23 |
-
# add (or update) the remote exactly once
|
24 |
-
git remote add hf https://[email protected]/spaces/MooseML/homo-lumo-gap-predictor || \
|
25 |
-
git remote set-url hf https://[email protected]/spaces/MooseML/homo-lumo-gap-predictor
|
26 |
-
|
27 |
-
# push current branch (main) to the Space
|
28 |
-
git push -f hf HEAD:main
|
|
|
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@v3
|
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://MooseML:[email protected]/spaces/MooseML/homo-lumo-gap-predictor main
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|