ds2api / .github /workflows /sync-to-hf.yml
204848
Add GitHub Action to auto-sync to Hugging Face
745c481
Raw
History Blame Contribute Delete
605 Bytes
name: Sync to Hugging Face
on:
push:
branches: [main]
jobs:
sync-to-hf:
runs-on: ubuntu-latest
steps:
- name: Checkout GitHub
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to Hugging Face
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://a3216:${HF_TOKEN}@huggingface.co/spaces/a3216/ds2api
git push hf main --force