From 00478ca58a2cd94a66e8104162d5c4eff373f00b Mon Sep 17 00:00:00 2001 From: SB-Reborn Date: Tue, 1 Oct 2024 12:55:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0markdownlint=E5=88=B0ci=20(#2?= =?UTF-8?q?89)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update wiki-deploy.yml * Update test.yml --- .github/workflows/test.yml | 16 +++++++++++++--- .github/workflows/wiki-deploy.yml | 15 ++++++++++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ad80026ff..cad292f9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,10 +14,20 @@ jobs: fetch-depth: 0 - name: "setup pnpm" uses: "pnpm/action-setup@v4" - - name: "setup node" + - name: "setup node" uses: "actions/setup-node@v4" with: node-version: 20 - - name: Install and Build - run: pnpm install && pnpm run --parallel build + + - name: "Install" + run: "pnpm install" + + - name: "MarkdownLint Check" + uses: DavidAnson/markdownlint-cli2-action@v17 + with: + fix: true + globs: 'docs*/**/*.md' + + - name: "Build" + run: "pnpm run --parallel build" diff --git a/.github/workflows/wiki-deploy.yml b/.github/workflows/wiki-deploy.yml index 2b2a73aaf..5e75ab636 100644 --- a/.github/workflows/wiki-deploy.yml +++ b/.github/workflows/wiki-deploy.yml @@ -29,17 +29,30 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + - name: "setup pnpm" uses: "pnpm/action-setup@v4" + - name: "setup node" uses: "actions/setup-node@v4" with: node-version: 20 - # 安装 Npm 并构建 + + # 安装 npm 包 - name: Install run: pnpm install + + # MarkdownLint 检查 + - name: "MarkdownLint Check" + uses: "DavidAnson/markdownlint-cli2-action@v17" + with: + fix: true + globs: 'docs*/**/*.md' + + # 构建 - name: Build run: pnpm run --parallel build + # 部署 - name: Deploy uses: JamesIves/github-pages-deploy-action@v4