name: Upload Docs on: workflow_dispatch: # Allows manual triggering of the workflow release: types: [published] # Single group (not per-ref): each release tag is its own ref, and parallel runs # would race to create separate content releases instead of reusing one. concurrency: group: ${{ github.workflow }} cancel-in-progress: false jobs: upload-docs: runs-on: ubuntu-latest if: >- github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, '@sanity/cli@') env: TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TEAM: ${{ vars.TURBO_TEAM }} steps: - uses: actions/checkout@v7 - name: Setup Environment uses: ./.github/actions/setup with: node-version: 24 - name: Build CLI run: pnpm build:cli - name: Upload docs run: pnpm docs:upload env: SANITY_DOCS_API_TOKEN: ${{ secrets.SANITY_DOCS_API_TOKEN }}