github-actions[ci]
Clean sync from main branch - 2025-08-07 22:25:30
dfef45c
name: Sync to Hugging Face hub
on:
workflow_run:
workflows: [Python Test]
branches: [main]
types: [completed]
workflow_dispatch:
jobs:
sync-to-hub:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Push to hub
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
# Configure Git user identity
git config user.name "github-actions[ci]"
git config user.email "github-actions[ci]@users.noreply.github.com"
# Configure LFS tracking
git lfs track "*.pdf"
git lfs track "*.png"
# Create a new orphan branch (no history)
git checkout --orphan hf-clean
git add .
git commit -m "Clean sync from main branch - $(date '+%Y-%m-%d %H:%M:%S')"
# Force push to Hugging Face main branch
git push -f https://HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/atomind/mlip-arena hf-clean:main