Paul Babu Kadali
Update Hugging Face remote URL in workflow
1d6e889 unverified
Raw
History Blame Contribute Delete
1.03 kB
name: Sync to Hugging Face Org Hub
on:
push:
branches: [main]
workflow_dispatch:
jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Configure Git LFS for Hugging Face and push LFS objects
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git config --global user.email "github-actions@github.com"
git config --global user.name "GitHub Actions"
# Add HF remote
git remote add hf https://kaiser784:$HF_TOKEN@huggingface.co/spaces/OpenKuber/Noisy_Boy_Inference
# Fetch all LFS objects from GitHub origin
git lfs fetch --all origin
# Push LFS objects to Hugging Face LFS storage first
git lfs push --all hf
- name: Push commits to Hugging Face Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git push --force hf HEAD:main