diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 1d99a28..2f7cff0 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,13 +1,10 @@ name: Deploy Documentation +# Publish docs when a version is released (changesets creates a GitHub Release on publish), so the +# site documents the latest *released* library rather than every commit on main. on: - workflow_run: - workflows: ["CI"] - types: - - completed - branches: - - main - workflow_dispatch: + release: + types: [published] permissions: contents: read @@ -15,8 +12,10 @@ permissions: id-token: write concurrency: + # A version bump can publish several Releases at once (monorepo); collapse that burst of events + # for the same commit into a single Pages deploy — the latest run cancels earlier ones. group: pages - cancel-in-progress: false + cancel-in-progress: true env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true @@ -25,7 +24,6 @@ jobs: build: runs-on: ubuntu-latest timeout-minutes: 15 - if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} steps: - name: Checkout uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7