JermaineAI commited on
Commit
323023d
·
1 Parent(s): cdf77ca

Add auto-sync to Hugging Face

Browse files
Files changed (1) hide show
  1. .github/workflows/sync_code.yml +25 -0
.github/workflows/sync_code.yml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ # Allows you to click a button to sync manually if needed
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ sync-to-hub:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ with:
14
+ fetch-depth: 0
15
+ lfs: true
16
+ - name: Push to Hub
17
+ env:
18
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
19
+ run: |
20
+ git config --global user.email "Jaykay73@users.noreply.github.com"
21
+ git config --global user.name "Jaykay73"
22
+ # Add the Hugging Face remote
23
+ git remote add space https://Jaykay73:$HF_TOKEN@huggingface.co/spaces/Jaykay73/match-api
24
+ # Force push to ensure they match exactly
25
+ git push --force space main