scaler-openenv / .github /workflows /sync-to-hf.yml
suraj-01's picture
Update sync-to-hf.yml
ba50a7f unverified
raw
history blame contribute delete
878 Bytes
name: Sync to Hugging Face Space
on:
push:
branches: [main]
workflow_dispatch: # lets you trigger manually from GitHub UI
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # full history needed for git push
lfs: true # important if weights are tracked with Git LFS
- name: Configure git identity
run: |
git config user.email "actions@github.com"
git config user.name "GitHub Actions"
- name: Push to Hugging Face Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
HF_USERNAME: ${{ secrets.HF_USERNAME }}
run: |
git remote add hf https://${HF_USERNAME}:${HF_TOKEN}@huggingface.co/spaces/scaler-hack/scaler-openenv
git push hf main --force