@@ -213,6 +213,34 @@ jobs:
213213 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
214214 run : gh release edit "v${VERSION}" --draft=false --repo "${{ github.repository }}"
215215
216+ # Deploy viteplus.dev from the release commit after the npm packages and the
217+ # GitHub release are published, so the site and the install scripts always
218+ # match the released vp. Skipped for prereleases: production docs must keep
219+ # describing the latest stable release. See rfcs/deploy-docs-on-release.md.
220+ deploy-docs :
221+ name : Deploy docs
222+ runs-on : ubuntu-latest
223+ needs : [check, Release]
224+ if : >-
225+ needs.check.outputs.version_changed == 'true' &&
226+ !contains(needs.check.outputs.version, '-')
227+ # Shared with deploy-docs.yml so production deploys serialize across both
228+ # entry paths. Only the newest pending run survives in the group; if this
229+ # job's pending run is replaced by a manual dispatch, the canceled job
230+ # holds back discord-notify and the deploy must be re-run.
231+ concurrency :
232+ group : deploy-docs
233+ cancel-in-progress : false
234+ permissions :
235+ contents : read
236+ steps :
237+ - uses : taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
238+
239+ - uses : ./.github/actions/deploy-docs
240+ with :
241+ void-project : viteplus
242+ void-token : ${{ secrets.VOID_TOKEN }}
243+
216244 # Build and push the official toolchain Docker image to GHCR after the npm
217245 # release is published (the image installs vp from npm, so the version must
218246 # exist first). See docker/Dockerfile and docs/guide/docker.md.
@@ -266,15 +294,22 @@ jobs:
266294 VP_VERSION=${{ env.VERSION }}
267295 provenance : false
268296
269- # Announce the release on Discord last, after the Docker images are published,
270- # so the message can include the GHCR image. Runs after the npm release
271- # (Release) and the images (publish-docker) .
297+ # Announce the release on Discord last, after the Docker images and the docs
298+ # are published, so the message never points at a missing image or a site
299+ # that still shows the previous release .
272300 discord-notify :
273301 name : Notify Discord
274302 runs-on : ubuntu-latest
275303 # publish-docker already needs Release, so depending on it orders this last.
276- needs : [check, publish-docker]
277- if : needs.check.outputs.version_changed == 'true'
304+ # deploy-docs is skipped for prereleases; gate on its result explicitly so
305+ # prerelease announcements still go out, while a failed docs deploy on a
306+ # stable release holds the announcement back.
307+ needs : [check, publish-docker, deploy-docs]
308+ if : >-
309+ !cancelled() &&
310+ needs.check.outputs.version_changed == 'true' &&
311+ needs.publish-docker.result == 'success' &&
312+ (needs.deploy-docs.result == 'success' || needs.deploy-docs.result == 'skipped')
278313 env :
279314 VERSION : ${{ needs.check.outputs.version }}
280315 IMAGE : ghcr.io/voidzero-dev/vite-plus
0 commit comments