gavinzli commited on
Commit
a2ed7c5
·
1 Parent(s): 7ac471a

Refactor GitHub Actions workflow; update push command and ignore large sqlite3 files

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +19 -6
.github/workflows/main.yml CHANGED
@@ -1,9 +1,8 @@
1
- name: Sync to Hugging Face hub
 
2
  on:
3
  push:
4
  branches: [main]
5
-
6
- # to run this workflow manually from the Actions tab
7
  workflow_dispatch:
8
 
9
  jobs:
@@ -13,8 +12,22 @@ jobs:
13
  - uses: actions/checkout@v3
14
  with:
15
  fetch-depth: 0
16
- # lfs: true
17
- - name: Push to hub
 
 
 
 
 
 
 
 
 
 
 
 
18
  env:
19
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
20
- run: git push https://OxbridegeEcon:[email protected]/spaces/Oxbridge-Economics/Mailbox main --force
 
 
 
1
+ name: Sync to Hugging Face Hub
2
+
3
  on:
4
  push:
5
  branches: [main]
 
 
6
  workflow_dispatch:
7
 
8
  jobs:
 
12
  - uses: actions/checkout@v3
13
  with:
14
  fetch-depth: 0
15
+
16
+ - name: Configure Git
17
+ run: |
18
+ git config --global user.email "[email protected]"
19
+ git config --global user.name "GitHub Actions Bot"
20
+
21
+ - name: Ensure large files are ignored
22
+ run: |
23
+ echo "app/models/chroma/data/chroma.sqlite3" >> .gitignore
24
+ echo "models/chroma/data/chroma.sqlite3" >> .gitignore
25
+ git add .gitignore
26
+ git commit -m "Ignore large sqlite3 files" || echo "No changes to commit"
27
+
28
+ - name: Push to Hub
29
  env:
30
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
31
+ run: |
32
+ git remote set-url origin https://Oxbridge-Economics:[email protected]/spaces/Oxbridge-Economics/Mailbox
33
+ git push origin main