kimddol's picture
Upload folder using huggingface_hub
95f8d1c verified
raw
history blame contribute delete
831 Bytes
name: Deploy to Hugging Face Spaces
on:
push:
branches: [ "main" ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: pip install huggingface_hub
- name: Push to Hugging Face Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
pip install huggingface_hub
python - <<EOF
from huggingface_hub import HfApi
api = HfApi()
api.upload_folder(
folder_path=".",
repo_id="kimddol/PersonaMate",
repo_type="space",
token="${HF_TOKEN}"
)
EOF