name: Sync Hugging Face Space on: push: branches: [main] workflow_dispatch: permissions: contents: read concurrency: group: sync-huggingface cancel-in-progress: false jobs: sync: runs-on: ubuntu-latest environment: q6_HF steps: - uses: actions/checkout@v4 with: fetch-depth: 0 lfs: true persist-credentials: false - name: Push to Hugging Face env: HF_TOKEN: ${{ secrets.Q6_HF_TOKEN }} HF_REPO: https://huggingface.co/spaces/q6/N run: | test -n "$HF_TOKEN" || { echo "Q6_HF_TOKEN is not configured"; exit 1; } HF_AUTH=$(printf 'q6:%s' "$HF_TOKEN" | base64 -w0) echo "::add-mask::$HF_AUTH" git -c "http.https://huggingface.co/.extraheader=Authorization: Basic $HF_AUTH" push "$HF_REPO" HEAD:main