This repository was archived by the owner on Sep 23, 2026. It is now read-only.
Repository navigation
feat(shell): guide users to upgrade to the new Kimi Code (#2432) #488
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docs (GitHub Pages) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| deploy: | |
| # Only run on the original repository, not on forks | |
| if: github.repository == 'MoonshotAI/kimi-cli' | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy.outputs.page_url }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Cache docs node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: docs/node_modules | |
| key: ${{ runner.os }}-docs-node-modules-${{ hashFiles('docs/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-docs-node-modules- | |
| - name: Configure GitHub Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Set VitePress base | |
| shell: bash | |
| env: | |
| BASE_PATH: ${{ steps.pages.outputs.base_path }} | |
| run: | | |
| set -euo pipefail | |
| if [[ -z "${BASE_PATH}" ]]; then | |
| base="/" | |
| else | |
| base="${BASE_PATH%/}/" | |
| fi | |
| echo "VITEPRESS_BASE=${base}" >> "$GITHUB_ENV" | |
| - name: Install docs dependencies | |
| working-directory: docs | |
| run: npm install --no-package-lock | |
| - name: Build docs | |
| working-directory: docs | |
| env: | |
| VITEPRESS_BASE: ${{ env.VITEPRESS_BASE }} | |
| run: npm run build | |
| - name: Add .nojekyll | |
| run: touch docs/.vitepress/dist/.nojekyll | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/.vitepress/dist | |
| - name: Deploy to GitHub Pages | |
| id: deploy | |
| uses: actions/deploy-pages@v4 |