Skip to content

Commit

Permalink
feat: 更新GitHub自动化构建配置
Browse files Browse the repository at this point in the history
  • Loading branch information
super456 committed Apr 26, 2024
1 parent a6f6067 commit 8ea9e8b
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/generate_readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -45,11 +47,13 @@ jobs:
branch: action-pages
folder: dist

- name: 生成 README
run: pnpm greadme && pnpm prettier

- name: Push
uses: github-actions-x/[email protected]
with:
github-token: ${{ secrets.ACCESS_TOKEN }}
push-branch: main
commit-message: 'Update README.md by Github Actions'
name: github-actions[bot]
email: 41898282+github-actions[bot]@users.noreply.github.com

0 comments on commit 8ea9e8b

Please sign in to comment.