Sage / .github /workflows /hf-sync.yml
vxa8502's picture
Move assets to separate branch for HF compatibility
b72c3df
raw
history blame contribute delete
578 Bytes
name: Sync to Hugging Face Spaces
on:
push:
branches: [main]
workflow_dispatch:
jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to Hugging Face Spaces
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
HF_USERNAME: ${{ vars.HF_USERNAME }}
SPACE_NAME: ${{ vars.SPACE_NAME }}
run: |
git remote add hf https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME || true
git push hf main --force