name: Sync to Hugging Face Space on: push: branches: - main workflow_dispatch: concurrency: group: sync-to-huggingface cancel-in-progress: true jobs: sync-to-huggingface: name: Sync GitHub main to Hugging Face Space runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Push main to Hugging Face Space env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | git remote add huggingface "https://hf:${HF_TOKEN}@huggingface.co/spaces/solidprivacy/scrub" git push --force huggingface HEAD:main