Skip to content

Commit 455ac63

Browse files
btraversclaude
andcommitted
ci: deploy docs on release instead of every push to main
Deploy the documentation site when a version is released instead of on every push to main, so the published docs describe the latest *released* library rather than unreleased main. changesets already creates a GitHub Release on publish, so trigger on `release: published` (the release tag's commit is checked out, matching the released code). `workflow_dispatch` stays as a manual redeploy escape hatch for docs-only fixes between releases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent fb07fff commit 455ac63

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
name: Deploy Documentation
22

3+
# Publish docs when a version is released (changesets creates a GitHub Release on publish), so the
4+
# site documents the latest *released* library rather than every commit on main. `workflow_dispatch`
5+
# is a manual redeploy escape hatch for docs-only fixes between releases.
36
on:
4-
workflow_run:
5-
workflows: ["CI"]
6-
types:
7-
- completed
8-
branches:
9-
- main
7+
release:
8+
types: [published]
109
workflow_dispatch:
1110

1211
permissions:
@@ -25,7 +24,6 @@ jobs:
2524
build:
2625
runs-on: ubuntu-latest
2726
timeout-minutes: 15
28-
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
2927
steps:
3028
- name: Checkout
3129
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7

0 commit comments

Comments
 (0)