name: Sync to Hugging Face Space on: push: branches: - main workflow_dispatch: jobs: sync-to-hub: runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v3 with: lfs: true fetch-depth: 0 - name: Set up git run: | git config --global user.email "actions@github.com" git config --global user.name "GitHub Actions" - name: Push to Hugging Face Space env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | git remote remove space 2>/dev/null || true git remote add space https://huggingface.co/spaces/Mostafa174/Topic_Modeling_AI git push --force "https://user:$HF_TOKEN@huggingface.co/spaces/Mostafa174/Topic_Modeling_AI" HEAD:main