perf(actions): Improve action performance (#283)

pull/286/head
北雁云依 2024-03-12 11:21:20 +08:00 committed by Rizumu Ayaka
parent 1b492e2490
commit 37cf4041ef
2 changed files with 15 additions and 11 deletions

View File

@ -7,19 +7,21 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v3
with: with:
version: latest version: latest
run_install: true - uses: actions/setup-node@v4
- uses: actions/setup-node@v3
with: with:
cache: pnpm cache: pnpm
- run: pnpm build - name: Install
run: pnpm install
- name: Build
run: pnpm build
env: env:
NODE_OPTIONS: --max_old_space_size=4096 NODE_OPTIONS: --max_old_space_size=4096
- name: Publish to Cloudflare Pages - name: Publish to Cloudflare Pages

View File

@ -8,16 +8,18 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v3
with: with:
version: latest version: latest
run_install: true - uses: actions/setup-node@v4
- uses: actions/setup-node@v3
with: with:
cache: pnpm cache: pnpm
- run: pnpm build - name: Install
run: pnpm install
- name: Build
run: pnpm build
env: env:
NODE_OPTIONS: --max_old_space_size=4096 NODE_OPTIONS: --max_old_space_size=4096