ashishbaberwal commited on
Commit
7e1da1e
·
1 Parent(s): d08cf0b
Files changed (1) hide show
  1. .github/workflows/sync_to_hf.yml +40 -0
.github/workflows/sync_to_hf.yml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face Space
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+
9
+ concurrency:
10
+ group: sync-to-hf-space
11
+ cancel-in-progress: true
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ sync:
18
+ runs-on: ubuntu-latest
19
+
20
+ steps:
21
+ - name: Checkout repository
22
+ uses: actions/checkout@v4
23
+ with:
24
+ fetch-depth: 0
25
+
26
+ - name: Configure git identity
27
+ run: |
28
+ git config user.name "github-actions[bot]"
29
+ git config user.email "github-actions[bot]@users.noreply.github.com"
30
+
31
+ - name: Add Hugging Face remote
32
+ env:
33
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
34
+ run: |
35
+ git remote add hf "https://Spirit-26:${HF_TOKEN}@huggingface.co/spaces/Spirit-26/code-review-environment"
36
+ git fetch hf main
37
+
38
+ - name: Push to Hugging Face Space
39
+ run: |
40
+ git push --force-with-lease hf HEAD:main