This commit is contained in:
minimouse0 2024-08-13 23:29:30 +08:00
parent 5525be6002
commit 44bbdcca1a
2 changed files with 14 additions and 24 deletions

View File

@ -10,18 +10,12 @@ jobs:
# 拉取代码
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v3
- name: "setup pnpm"
uses: "pnpm/action-setup@v4"
- name: "setup node"
uses: "actions/setup-node@v4"
with:
node-version: 20
# 启用缓存加速
- name: Cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# 安装 Npm 并构建
- name: Install and Build
run: npm install && npm run build
run: pnpm install && pnpm run build

View File

@ -27,21 +27,17 @@ jobs:
# 拉取代码
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v3
- name: "setup pnpm"
uses: "pnpm/action-setup@v4"
- name: "setup node"
uses: "actions/setup-node@v4"
with:
node-version: 20
# 启用缓存加速部署
- name: Cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# 安装 Npm 并构建
- name: Install and Build
run: npm install && npm run build
- name: Install
run: pnpm install
- name: Build
run: pnpm run build
# 部署
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4