Spaces:
Paused
Paused
| name: Push to Hugging Face Space with LFS | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| sync-to-hub: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 # Full history needed for git push | |
| # Install Git LFS | |
| - name: Install Git LFS | |
| run: | | |
| git lfs install | |
| git lfs track "*.png" # Track PNG files with LFS (add other extensions if needed) | |
| # Ensure that .gitattributes is committed if it's not already | |
| - name: Commit .gitattributes | |
| run: | | |
| git add .gitattributes | |
| git commit -m "Track PNG files with Git LFS" || echo "No changes to commit .gitattributes" | |
| # Pull LFS files if any | |
| - name: Pull LFS files | |
| run: git lfs pull | |
| # Add and commit the LFS tracked files | |
| - name: Stage and Commit changes | |
| run: | | |
| git add . # Stage changes | |
| git commit -m "Sync changes to Hugging Face Space" || echo "No changes to commit" | |
| # Push to Hugging Face space | |
| - name: Push to Hugging Face space | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| git push --force https://prathameshv07:$HF_TOKEN@huggingface.co/spaces/prathameshv07/DanceDynamics.git main | |