diff --git a/.github/workflows/generate_readme.yml b/.github/workflows/generate_readme.yml index 328b072..c6e420d 100644 --- a/.github/workflows/generate_readme.yml +++ b/.github/workflows/generate_readme.yml @@ -6,32 +6,34 @@ on: branches: - main # 只在文件变更时触发 - paths: - - '**.xmind' + # paths: + # - '**.xmind' jobs: bot: runs-on: ubuntu-latest + strategy: + matrix: + node-version: [latest] + steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: persist-credentials: false fetch-depth: 0 - - name: 安装 pnpm - uses: pnpm/action-setup@v2.0.1 + - name: Node.js 版本:${{ matrix.node-version }} + uses: actions/setup-node@v3 with: - version: 6.15.1 + node-version: ${{ matrix.node-version }} + cache: pnpm - - name: Set node version to 16 - uses: actions/setup-node@v2 - with: - node-version: 16 - cache: 'pnpm' + - name: 安装 pnpm + run: npm install pnpm -g - - name: 安装依赖及生成 README - run: pnpm install && pnpm greadme && pnpm prettier + - name: 安装依赖 + run: pnpm install - name: 打包 run: pnpm run build @@ -45,6 +47,9 @@ jobs: branch: action-pages folder: dist + - name: 生成 README + run: pnpm greadme && pnpm prettier + - name: Push uses: github-actions-x/commit@v2.9 with: @@ -52,4 +57,3 @@ jobs: push-branch: main commit-message: 'Update README.md by Github Actions' name: github-actions[bot] - email: 41898282+github-actions[bot]@users.noreply.github.com