From 0bffadb4b46c23112982f074119d39e0c3e0e323 Mon Sep 17 00:00:00 2001 From: bj456736 <161294296+bj456736@users.noreply.github.com> Date: Thu, 4 Jun 2026 22:01:10 +0800 Subject: [PATCH] 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 Co-authored-by: qer --- .github/workflows/docs-deploy.yml | 8 +------- .github/workflows/release.yml | 11 +++++++++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index 1412d1d0f..21cd768cb 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -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: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 140fc761e..1f74dc9d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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