Spaces:
Sleeping
Sleeping
Create add_space.yaml
Browse files
.github/workflows/add_space.yaml
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Setting Up New Hugging Face Space
|
2 |
+
|
3 |
+
on:
|
4 |
+
workflow_dispatch:
|
5 |
+
|
6 |
+
jobs:
|
7 |
+
sync-to-hub:
|
8 |
+
runs-on: ubuntu-latest
|
9 |
+
strategy:
|
10 |
+
matrix:
|
11 |
+
space_name: [company-pet-policy, about-mls, shakespeare] # List your Hugging Face space names here
|
12 |
+
|
13 |
+
steps:
|
14 |
+
- name: Checkout repository
|
15 |
+
uses: actions/checkout@v2
|
16 |
+
with:
|
17 |
+
fetch-depth: 0
|
18 |
+
lfs: true
|
19 |
+
|
20 |
+
- name: Configure Git
|
21 |
+
run: |
|
22 |
+
git config --global user.email "[email protected]"
|
23 |
+
git config --global user.name "GitHub Actions"
|
24 |
+
|
25 |
+
- name: Push to Hugging Face
|
26 |
+
env:
|
27 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
28 |
+
run: |
|
29 |
+
git remote add space https://huggingface.co/spaces/david-oplatka/${{ matrix.space_name }}.git
|
30 |
+
git push --force https://huggingface.co/spaces/david-oplatka:[email protected]/spaces/david-oplatka/${{ matrix.space_name }}.git main
|