maxhuber commited on
Commit
0517016
·
2 Parent(s): 76d9b0f dc5e249

Merge branch 'main' of https://github.com/MaxHuber888/MindReader-Quantum

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +38 -0
.github/workflows/main.yml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Check file size and Sync to Hugging Face hub
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ pull_request:
6
+ branches: [main]
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ check-file-size:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+ - name: Check large files
15
+ run: |
16
+ #!/bin/bash
17
+ max_size=10485760 # 10MB in bytes
18
+ large_files=$(find . -type f -size +${max_size}c)
19
+ if [ -n "$large_files" ]; then
20
+ echo "Warning: The following files are larger than 10MB:"
21
+ echo "$large_files"
22
+ exit 1
23
+ else
24
+ echo "No files larger than 10MB found."
25
+ fi
26
+
27
+ sync-to-hub:
28
+ needs: check-file-size
29
+ runs-on: ubuntu-latest
30
+ steps:
31
+ - uses: actions/checkout@v3
32
+ with:
33
+ fetch-depth: 0
34
+ lfs: true
35
+ - name: Push to hub
36
+ env:
37
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
38
+ run: git push https://maxhuber:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/maxhuber/MindReader-Quantum main -f