Deploy the docs site only after a changesets publish

deploy.yml carried a push trigger on main, so every commit shipped the site
instead of only published releases. Drop the trigger; release.yml's
post-publish job and manual dispatch are the only ways to deploy.
This commit is contained in:
Hayden Bleasel
2026-09-13 23:31:46 -07:00
parent a6fe34925e
commit 6fc871d4fb
2 changed files with 5 additions and 6 deletions
+3 -5
View File
@@ -1,11 +1,9 @@
name: Deploy
# Builds the docs site (apps/docs) and ships it to Cloudflare Workers. Runs on
# every push to main, on demand, and from release.yml after a publish so the
# changelog picks up the new GitHub release.
# Builds the docs site (apps/docs) and ships it to Cloudflare Workers. Runs
# from release.yml after a changesets publish so the site and changelog track
# the published package, and on demand. Plain pushes to main do not deploy.
on:
push:
branches: [main]
workflow_dispatch:
workflow_call:
+2 -1
View File
@@ -67,7 +67,8 @@ jobs:
publish-script: npm run changeset publish
# Redeploy the docs site once a release is out so the changelog (built from
# GitHub releases) includes it. Pushes to main deploy on their own via deploy.yml.
# GitHub releases) includes it. This is the only automatic deploy; plain pushes
# to main do not ship the site.
deploy:
needs: release
if: needs.release.outputs.published == 'true'