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