differ-hug / .github /workflows /sync-to-hub.yml
componavt's picture
Update sync-to-hub.yml + correct actions
a3fb54b unverified
Raw
History Blame Contribute Delete
916 Bytes
name: Sync to Hugging Face Space
on:
push:
branches:
- main
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout GitHub repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # Важно для полной истории
- name: Configure Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- name: Push to Hugging Face Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
# Добавляем HF Space как remote (если ещё не добавлен)
git remote add hf https://huggingface.co/spaces/componavt/differ-hug || true
# Пушим код в HF через токен
git push https://componavt:${HF_TOKEN}@huggingface.co/spaces/componavt/differ-hug main --force