Bijay13's picture
added github action trigger
0709a33
raw
history blame contribute delete
727 Bytes
name: Deploy to Hugging Face Spaces
on:
push:
branches:
- main
jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Push to Hugging Face Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git remote add hf https://huggingface.co/spaces/${{ secrets.HF_SPACE_NAME }}
git push https://oauth2:$HF_TOKEN@huggingface.co/spaces/${{ secrets.HF_SPACE_NAME }} main:main --force