mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-09 17:29:12 +00:00
* 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>
51 lines
1 KiB
YAML
51 lines
1 KiB
YAML
name: Deploy Docs to GitHub Pages
|
|
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: pnpm/action-setup@v6
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version-file: .nvmrc
|
|
cache: pnpm
|
|
|
|
- run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build docs
|
|
run: pnpm -C docs run build
|
|
env:
|
|
VITEPRESS_BASE: /${{ github.event.repository.name }}/
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v5
|
|
with:
|
|
path: docs/.vitepress/dist
|
|
|
|
deploy:
|
|
if: github.ref == 'refs/heads/main'
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v5
|