Canstralian's picture
Create .github/workflows/depoly.yml
ef8b179 verified
raw
history blame
832 Bytes
name: Deploy to Hugging Face Spaces
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Push to Hugging Face Spaces
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git remote add space https://huggingface.co/spaces/HF_USERNAME/SPACE_NAME
git push https://HF_USERNAME:${HF_TOKEN}@huggingface.co/spaces/HF_USERNAME/SPACE_NAME main