Vatsal Gupta commited on
Commit
77407bd
·
unverified ·
1 Parent(s): 8b73345

Updated the test on huggingface

Browse files
.github/workflows/{huggingface.yaml → huggingface-push.yaml} RENAMED
File without changes
.github/workflows/huggingface-test.yaml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Test on Hugging Face hub
2
+ on:
3
+ pull_request:
4
+ branches: ["*"]
5
+ permissions:
6
+ contents: write
7
+ pull-requests: write
8
+ jobs:
9
+ sync-to-hub:
10
+ runs-on: ubuntu-latest
11
+ environment: HF_TOKEN
12
+ steps:
13
+ - name: Checkout repository
14
+ uses: actions/checkout@v5
15
+ with:
16
+ fetch-depth: 0
17
+ lfs: true
18
+ - name: Configure Git
19
+ run: |
20
+ git config --global user.email "action@github.com"
21
+ git config --global user.name "${{ github.actor }}"
22
+ - name: Push to Hugging Face Hub
23
+ env:
24
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
25
+ HF_USERNAME: ${{ github.repository_owner }}
26
+ HF_SPACE: github-test
27
+ HF_BRANCH: main
28
+ run: |
29
+ git remote set-url origin https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_SPACE
30
+ git push origin master:$HF_BRANCH --force