Pratik Bokade
commited on
Commit
·
7b97c90
1
Parent(s):
b14c653
Update main.yml
Browse files- .github/workflows/main.yml +18 -9
.github/workflows/main.yml
CHANGED
|
@@ -2,6 +2,8 @@ name: Sync to Hugging Face Space
|
|
| 2 |
on:
|
| 3 |
push:
|
| 4 |
branches: [main]
|
|
|
|
|
|
|
| 5 |
workflow_dispatch:
|
| 6 |
|
| 7 |
jobs:
|
|
@@ -10,8 +12,8 @@ jobs:
|
|
| 10 |
steps:
|
| 11 |
- uses: actions/checkout@v3
|
| 12 |
with:
|
| 13 |
-
fetch-depth: 0
|
| 14 |
-
lfs: true
|
| 15 |
|
| 16 |
- name: Install git-filter-repo
|
| 17 |
run: pip install git-filter-repo
|
|
@@ -19,10 +21,17 @@ jobs:
|
|
| 19 |
- name: Remove large file from history
|
| 20 |
run: git filter-repo --path "Rag_Documents/layout-parser-paper.pdf" --invert-paths --force
|
| 21 |
|
| 22 |
-
- name:
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
on:
|
| 3 |
push:
|
| 4 |
branches: [main]
|
| 5 |
+
|
| 6 |
+
# to run this workflow manually from the Actions tab
|
| 7 |
workflow_dispatch:
|
| 8 |
|
| 9 |
jobs:
|
|
|
|
| 12 |
steps:
|
| 13 |
- uses: actions/checkout@v3
|
| 14 |
with:
|
| 15 |
+
fetch-depth: 0 # Required for history rewriting
|
| 16 |
+
lfs: true # Enable Git LFS support
|
| 17 |
|
| 18 |
- name: Install git-filter-repo
|
| 19 |
run: pip install git-filter-repo
|
|
|
|
| 21 |
- name: Remove large file from history
|
| 22 |
run: git filter-repo --path "Rag_Documents/layout-parser-paper.pdf" --invert-paths --force
|
| 23 |
|
| 24 |
+
- name: Log in to Hugging Face Hub
|
| 25 |
+
env:
|
| 26 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 27 |
+
run: |
|
| 28 |
+
pip install -U "huggingface_hub>=0.20.0"
|
| 29 |
+
git config --global credential.helper store
|
| 30 |
+
echo "https://bpratik:$HF_TOKEN@huggingface.co" > ~/.git-credentials
|
| 31 |
+
|
| 32 |
+
- name: Push to hub
|
| 33 |
+
env:
|
| 34 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 35 |
+
run: |
|
| 36 |
+
git remote add hf https://huggingface.co/spaces/bpratik/Chatbot
|
| 37 |
+
git push --force hf main
|