Jonell Magallanes commited on
Commit
aa9417c
·
unverified ·
1 Parent(s): f5cc35d

Create main.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +34 -0
.github/workflows/main.yml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Deploy to Hugging Face Space
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ deploy:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout code (full history)
13
+ uses: actions/checkout@v3
14
+ with:
15
+ fetch-depth: 0
16
+
17
+ - name: Configure git
18
+ run: |
19
+ git config user.name "github-actions[bot]"
20
+ git config user.email "github-actions[bot]@users.noreply.github.com"
21
+
22
+ - name: Migrate existing binaries to Git LFS
23
+ run: |
24
+ git lfs install
25
+ git lfs migrate import --include="*.jpg,*.jpeg,*.png,*.gif,*.mp3,*.wav,*.flac,*.mp4,*.mkv,*.zip,*.tar,*.gz,*.ttf,*.otf,*.woff,*.woff2,*.pt,*.safetensors" --include-ref=refs/heads/main
26
+ git add .gitattributes
27
+ git commit -m "Migrate binary files to Git LFS" || true
28
+
29
+ - name: Push to Hugging Face
30
+ env:
31
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
32
+ run: |
33
+ git remote add space https://user:$HF_TOKEN@huggingface.co/spaces/Jonell01/Testing-file
34
+ git push --force space main