From 8c76ce06d070101e2535420c6168893985b96ad9 Mon Sep 17 00:00:00 2001 From: super456 Date: Fri, 26 Apr 2024 12:37:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0GitHub=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E6=9E=84=E5=BB=BA=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/generate_readme.yml | 19 +++++++++++++++++-- scripts/generateReadme.js | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate_readme.yml b/.github/workflows/generate_readme.yml index 2482bd7..e424937 100644 --- a/.github/workflows/generate_readme.yml +++ b/.github/workflows/generate_readme.yml @@ -19,7 +19,7 @@ jobs: persist-credentials: false fetch-depth: 0 - - name: Install pnpm + - name: 安装 pnpm uses: pnpm/action-setup@v2.0.1 with: version: 6.15.1 @@ -30,9 +30,24 @@ jobs: node-version: 16 cache: 'pnpm' - - name: Run Script + - name: 安装依赖及生成 README run: pnpm install && pnpm greadme && pnpm prettier + - name: 打包 + run: pnpm run build + + - name: 构建 pagefind 索引 + run: npx pagefind --source dist + + - name: 部署到 Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + repository-name: super456/FE-MindMap + clean: true + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} + branch: action-pages + folder: dist + - name: Push uses: github-actions-x/commit@v2.9 with: diff --git a/scripts/generateReadme.js b/scripts/generateReadme.js index 600cbbd..43764dc 100644 --- a/scripts/generateReadme.js +++ b/scripts/generateReadme.js @@ -66,7 +66,7 @@ pnpm build - [x] [浏览器缓存 ](https://github.com/maomao1996/FE-MindMap/blob/main/xmind/%E6%B5%8F%E8%A7%88%E5%99%A8%E7%BC%93%E5%AD%98.xmind) -1. 预览地址: +2. 预览地址: - - -