CHRIS / .github /workflows /sync-to-hf-space.yml
David Saylor
Create sync-to-hf-space.yml
f17905e unverified
name: Sync to Hugging Face Space
on:
push:
branches: [ "main" ]
workflow_dispatch:
jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- name: Checkout (with LFS)
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Push to Hugging Face Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Push Git + LFS pointers to the Space.
# This uses basic auth in the URL (username + token).
git push https://dmsaylor:$HF_TOKEN@huggingface.co/spaces/dmsaylor/CHRIS main