去掉不适当的“递归” (#60) #104
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: 部署文档 | |
| on: | |
| push: | |
| branches: | |
| # 确保这是你正在使用的分支名称 | |
| - main | |
| jobs: | |
| deploy-gh-pages: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install nix | |
| uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: "nixpkgs=channel:nixpkgs-unstable" | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
| - name: Show nixpkgs version | |
| run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version' | |
| - name: Build Docs | |
| run: | | |
| nix develop --ignore-environment --command bash -c ' | |
| set -e | |
| export NODE_OPTIONS=--max_old_space_size=8192 | |
| pnpm install | |
| pnpm run docs:build | |
| ' | |
| - name: 部署文档 | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| # 这是文档部署到的分支名称 | |
| branch: gh-pages | |
| folder: src/.vuepress/dist |