ci: group dependabot #226
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: ["master"] | |
| # 这个选项可以使你手动在 Action tab 页面触发工作流 | |
| workflow_dispatch: | |
| # 设置 GITHUB_TOKEN 的权限,以允许部署到 GitHub Pages。 | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # 允许一个并发的部署 | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| deploy-gh-pages: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| # 如果你文档需要 Git 子模块,取消注释下一行 | |
| # submodules: true | |
| - name: Install pnpm | |
| run: npm install -g pnpm | |
| - name: Set up Node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| env: | |
| NODE_OPTIONS: --max_old_space_size=8192 | |
| run: |- | |
| pnpm docs:build | |
| > src/.vuepress/dist/.nojekyll | |
| - name: Copy Google Auth File | |
| run: cp src/.vuepress/public/google0125794c904df104.html src/.vuepress/dist | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # Upload dist folder | |
| path: "./src/.vuepress/dist" | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |