extonlawrence commited on
Commit
30483de
·
unverified ·
1 Parent(s): 6e2a902

Create push-to-hub.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/push-to-hub.yml +28 -0
.github/workflows/push-to-hub.yml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:
10
+ sync-to-hub:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+ with:
15
+ fetch-depth: 0
16
+ lfs: true
17
+
18
+ - name: Install Git LFS
19
+ run: |
20
+ git lfs install
21
+ git lfs pull
22
+
23
+ - name: Push to hub
24
+ env:
25
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
26
+ run: |
27
+ git remote add space https://andrewelawrence:$HF_TOKEN@huggingface.co/spaces/andrewelawrence/chat || true
28
+ git push --force space main