Final_Assignment_Template / .github /workflows /sync-to-huggingface.yml
emagodev's picture
add github actions to sync with hf spaces
c7c6e74
Raw
History Blame Contribute Delete
713 Bytes
name: Sync to Hugging Face Hub
on:
push:
branches: [main]
workflow_dispatch:
jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Setup Git
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Push to Hugging Face
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git remote add hf https://emagodev:$HF_TOKEN@huggingface.co/spaces/emagodev/Final_Assignment_Template
git push -f hf main