Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bff1c6b

Browse files
ci: 🎡 workflow配置修改
1 parent c7e48c2 commit bff1c6b

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

‎.github/workflows/build.yml‎

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -28,49 +28,49 @@ jobs:
2828
with:
2929
node-version: 16
3030

31-
# # 安装pnpm
32-
# - uses: pnpm/action-setup@v2
33-
# name: Install pnpm
34-
# with:
35-
# version: 7
36-
# run_install: false
37-
38-
# - name: Get pnpm store directory
39-
# shell: bash
40-
# run: |
41-
# echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
31+
# 安装pnpm
32+
- uses: pnpm/action-setup@v2
33+
name: Install pnpm
34+
with:
35+
version: 7
36+
run_install: false
4237

43-
# # 使用pnpm缓存可以减少安装时间
44-
# - name: Setup pnpm cache
45-
# uses: actions/cache@v3
46-
# with:
47-
# path: ${{ env.STORE_PATH }}
48-
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
49-
# restore-keys: |
50-
# ${{ runner.os }}-pnpm-store-
51-
# # 安装依赖
52-
# - name: Install dependencies and build
53-
# run: |
54-
# pnpm install
55-
# pnpm run build:prod
38+
- name: Get pnpm store directory
39+
shell: bash
40+
run: |
41+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
5642
57-
# 如果你的依赖是使用npm的,用这种
58-
# 缓存 npm node_modules
59-
- name: Cache dependencies
43+
# 使用pnpm缓存可以减少安装时间
44+
- name: Setup pnpm cache
6045
uses: actions/cache@v3
6146
with:
62-
path: ~/.npm
63-
key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
47+
path: ${{ env.STORE_PATH }}
48+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
6449
restore-keys: |
65-
${{ runner.os }}-npm-cache-
66-
67-
# 安装依赖 npm
68-
- name: Install dependencies
69-
# 如果没有命中缓存才执行 npm install
70-
if: steps.cache-deps.outputs.cache-hit != 'true'
50+
${{ runner.os }}-pnpm-store-
51+
# 安装依赖
52+
- name: Install dependencies and build
7153
run: |
72-
npm install --legacy-peer-deps
73-
npm run build:prod
54+
pnpm install
55+
pnpm run build:prod
56+
57+
# # 如果你的依赖是使用npm的,用这种
58+
# # 缓存 npm node_modules
59+
# - name: Cache dependencies
60+
# uses: actions/cache@v3
61+
# with:
62+
# path: ~/.npm
63+
# key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
64+
# restore-keys: |
65+
# ${{ runner.os }}-npm-cache-
66+
67+
# # 安装依赖 npm
68+
# - name: Install dependencies
69+
# # 如果没有命中缓存才执行 npm install
70+
# if: steps.cache-deps.outputs.cache-hit != 'true'
71+
# run: |
72+
# npm install --legacy-peer-deps
73+
# npm run build:prod
7474

7575
# 部署到gh-pages分支
7676
- name: deploy

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /