name: Sync to Hugging Face hub on: push: branches: - hfdeploy workflow_dispatch: # Allows manual trigger jobs: sync-to-hub: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 lfs: true # Enable if you have files >10MB - name: Push to hub env: HF_TOKEN: ${{ secrets.HF_TOKEN }} HF_URL: https://marekb-sci:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/NMR-CeNT-UW/ShimNet-development run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" # Add temp remote, fetch to update lease, push, then clean up git remote add hf $HF_URL git fetch hf main git push --force-with-lease hf hfdeploy:main git remote remove hf