name: Sync to Hugging Face Hub on: push: branches: [main] workflow_dispatch: # To trigger the workflow manually from the Actions tab jobs: sync-to-hub: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 lfs: true - name: Set up git configuration run: | git config user.name "GitHub Actions" git config user.email "actions@github.com" - name: Pull from the Hugging Face hub with merge run: | git pull --no-rebase https://BoltzmannEntropy:$HF_TOKEN@huggingface.co/spaces/BoltzmannEntropy/vlms main env: HF_TOKEN: ${{ secrets.HF_TOKEN }} - name: Push changes to the Hugging Face hub run: | git push https://BoltzmannEntropy:$HF_TOKEN@huggingface.co/spaces/BoltzmannEntropy/vlms main env: HF_TOKEN: ${{ secrets.HF_TOKEN }}