ci: deploy docs only on release to keep docs in sync with published versions (#425)

* ci: deploy docs only on release to keep docs in sync with published versions

Previously docs were deployed on every push to main, which meant
unreleased features could appear in the public documentation.
This changes the trigger to release:published so that docs only
update when a new version is actually shipped, plus manual dispatch
for emergencies.

* ci: deploy docs from release workflow

---------

Co-authored-by: root <root@localhost.localdomain>
Co-authored-by: qer <wbxl2000@outlook.com>
This commit is contained in:
bj456736 2026-06-04 22:01:10 +08:00 committed by GitHub
parent 8e5be975ec
commit 0bffadb4b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 7 deletions

View file

@ -1,13 +1,7 @@
name: Deploy Docs to GitHub Pages
on:
push:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/docs-deploy.yml'
workflow_call:
workflow_dispatch:
permissions:

View file

@ -13,6 +13,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'MoonshotAI'
outputs:
packages_published: ${{ steps.changesets.outputs.published }}
kimi_native_release: ${{ steps.kimi-release.outputs.should_publish }}
kimi_release_tag: ${{ steps.kimi-release.outputs.tag }}
permissions:
@ -70,6 +71,16 @@ jobs:
env:
CHANGESETS_PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }}
deploy-docs:
name: Deploy docs
needs: release
if: needs.release.outputs.packages_published == 'true'
uses: ./.github/workflows/docs-deploy.yml
permissions:
contents: read
pages: write
id-token: write
native-artifacts:
name: Native release artifact
needs: release