Create sync-to-hf.yml
Browse files
.github/workflows/sync-to-hf.yml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Sync to Hugging Face Spaces
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches:
|
6 |
+
- main # Trigger the workflow on pushes to the 'main' branch
|
7 |
+
|
8 |
+
jobs:
|
9 |
+
deploy:
|
10 |
+
runs-on: ubuntu-latest
|
11 |
+
|
12 |
+
steps:
|
13 |
+
- name: Checkout Repository
|
14 |
+
uses: actions/checkout@v3
|
15 |
+
|
16 |
+
- name: Set up Git
|
17 |
+
run: |
|
18 |
+
git config --global user.email "[email protected]"
|
19 |
+
git config --global user.name "Sumit Yadav"
|
20 |
+
|
21 |
+
- name: Push to Hugging Face
|
22 |
+
env:
|
23 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
24 |
+
run: |
|
25 |
+
git remote add huggingface https://huggingface.co/spaces/sumityadav329/text-to-image-webapp
|
26 |
+
git push huggingface main --force
|