Skip to content

Commit

Permalink
Create add_space.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
david-oplatka authored Jul 1, 2024
1 parent 039ea8e commit 16942af
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/add_space.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Setting Up New Hugging Face Space

on:
workflow_dispatch:

jobs:
sync-to-hub:
runs-on: ubuntu-latest
strategy:
matrix:
space_name: [company-pet-policy, about-mls, shakespeare] # List your Hugging Face space names here

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true

- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
- name: Push to Hugging Face
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git remote add space https://huggingface.co/spaces/david-oplatka/${{ matrix.space_name }}.git
git push --force https://huggingface.co/spaces/david-oplatka:[email protected]/spaces/david-oplatka/${{ matrix.space_name }}.git main

0 comments on commit 16942af

Please sign in to comment.