dolor3v / .github /workflows /deploy.yml
Daviddolor's picture
test CI/CD
9374ec2
Raw
History Blame Contribute Delete
743 Bytes
name: Deploy to Hugging Face Space
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Git
run: |
git config --global user.email "github-actions@users.noreply.github.com"
git config --global user.name "github-actions"
- name: Push to Hugging Face Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git clone https://$HF_USERNAME:$HF_TOKEN@huggingface.co/$HF_REPO hf-space
cp -r ./* hf-space/ || true
cd hf-space
git add .
git commit -m "CI/CD deploy from GitHub" || echo "No changes"
git push