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