gamingflexer commited on
Commit
1608f0e
1 Parent(s): 93cf16e

Update GitHub Actions workflow and add file size check

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +21 -7
.github/workflows/main.yml CHANGED
@@ -10,14 +10,28 @@ jobs:
10
  sync-to-hub:
11
  runs-on: ubuntu-latest
12
  steps:
13
- - uses: actions/checkout@v2
14
  with:
15
  fetch-depth: 0
16
- - name: Add remote
17
- env:
18
- HF: ${{ secrets.HF }}
19
- run: git remote add space https://noahgift:$HF@huggingface.co/spaces/asach/arxiv-plagiarism-checker-Ilm
20
  - name: Push to hub
21
  env:
22
- HF: ${{ secrets.HF }}
23
- run: git push --force https://noahgift:$HF@huggingface.co/spaces/asach/arxiv-plagiarism-checker-Ilm main
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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://HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/asach/arxiv-plagiarism-checker-Ilm main
21
+
22
+ name: Check file size
23
+ on: # or directly `on: [push]` to run the action on every push on any branch
24
+ pull_request:
25
+ branches: [main]
26
+
27
+ # to run this workflow manually from the Actions tab
28
+ workflow_dispatch:
29
+
30
+ jobs:
31
+ sync-to-hub:
32
+ runs-on: ubuntu-latest
33
+ steps:
34
+ - name: Check large files
35
+ uses: ActionsDesk/lfs-warning@v2.0
36
+ with:
37
+ filesizelimit: 10485760 # this is 10MB so we can sync to HF Spaces