xarical commited on
Commit
a7c208a
·
1 Parent(s): 68a4a06

Prep for HF deploy

Browse files
.github/README.md ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # nginx-template
2
+
3
+ A template for using nginx in Hugging Face Spaces
.github/workflows/checkfilesizes.yml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Check file sizes
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
+ check-file-size:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Check file sizes
14
+ uses: ActionsDesk/lfs-warning@v2.0
15
+ with:
16
+ filesizelimit: 10485760 # this is 10MB so we can sync to HF Spaces
.github/workflows/deploytospace.yml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Deploy to HF Space
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
+ deploy-to-space:
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 HF space
18
+ env:
19
+ HF_API_KEY: ${{ secrets.HF_API_KEY }}
20
+ SPACE_ID: ${{ secrets.SPACE_ID }}
21
+ run: git push https://xarical:$HF_API_KEY@huggingface.co/spaces/$SPACE_ID main