neuralgeekroot commited on
Commit
c17c0d3
·
1 Parent(s): b119084

updated yml file

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +23 -16
.github/workflows/main.yml CHANGED
@@ -1,26 +1,33 @@
1
  name: Sync to Hugging Face Space
 
2
  on:
3
  push:
4
- branches: [main]
5
 
6
- # to run this workflow manually from the Actions tab
7
- workflow_dispatch:
8
 
9
  jobs:
10
  sync-to-hub:
11
  runs-on: ubuntu-latest
 
12
  steps:
13
- - uses: actions/checkout@v3
14
- with:
15
- fetch-depth: 0
16
- lfs: false
17
-
18
- - name: Ignore large files
19
- run : git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch "Automated Code"' HEAD
 
 
 
 
 
 
 
 
 
20
 
21
- - name: Push to hub
22
- env:
23
- HF_TOKEN: ${{ secrets.HF_TOKEN_BLOG_AI }}
24
- run: git push --force https://neuralgeekroot:$HF_TOKEN@huggingface.co/spaces/neuralgeekroot/AutomatedCodeReview main
25
-
26
-
 
1
  name: Sync to Hugging Face Space
2
+
3
  on:
4
  push:
5
+ branches: [main] # Runs when pushing to main branch
6
 
7
+ workflow_dispatch: # Allows manual triggering
 
8
 
9
  jobs:
10
  sync-to-hub:
11
  runs-on: ubuntu-latest
12
+
13
  steps:
14
+ - name: Checkout Repository
15
+ uses: actions/checkout@v3
16
+ with:
17
+ fetch-depth: 0 # Full history
18
+ lfs: false
19
+
20
+ - name: Ignore Large Files
21
+ run: |
22
+ export FILTER_BRANCH_SQUELCH_WARNING=1
23
+ git filter-branch --force --index-filter 'git rm -rf --cached --ignore-unmatch "Automated Code"' --prune-empty --tag-name-filter cat -- --all
24
+
25
+ - name: Set Remote URL with Hugging Face Token
26
+ env:
27
+ HF_TOKEN: ${{ secrets.HF_TOKEN_BLOG_AI }}
28
+ run: |
29
+ git remote set-url origin https://neuralgeekroot:${HF_TOKEN}@huggingface.co/spaces/neuralgeekroot/AutomatedCodeReview.git
30
 
31
+ - name: Push to Hugging Face Space
32
+ run: |
33
+ git push origin main --force