Skip to content

Commit 6ec7cfd

Browse files
committed
chore: 修改 workflow
1 parent c7857f4 commit 6ec7cfd

File tree

1 file changed

+28
-16
lines changed

1 file changed

+28
-16
lines changed

.github/workflows/first-demo.yml

+28-16
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
name: GitHub Actions Demo
2-
on:
2+
3+
on:
34
push:
4-
jobs:
5+
branches: ["master"]
6+
7+
jobs:
58
Pages:
69
runs-on: ubuntu-latest
710
steps:
8-
# 迁出触发的流程的版本 能让下面的工作流程访问
9-
- name: Checkout code
10-
uses: actions/checkout@v3
11-
- name: Setup pnpm
12-
uses: pnpm/action-setup@v2
13-
with:
14-
version: 8
15-
- name: Use Node.js ${{ matrix.node-version }}
16-
uses: actions/setup-node@v3
17-
with:
18-
node-version: ${{ matrix.node-version }}
19-
cache: 'pnpm'
20-
- name: Install dependencies
21-
run: pnpm install
11+
# https://github.com/actions/checkout
12+
# 拉取代码
13+
- name: Checkout codes
14+
uses: actions/checkout@v3
15+
16+
# https://github.com/actions/setup-node
17+
# 安装 node
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 18.x
22+
23+
# https://github.com/pnpm/action-setup
24+
# 安装 pnpm
25+
- name: Setup pnpm
26+
uses: pnpm/action-setup@v2
27+
with:
28+
version: 8
29+
30+
# https://pnpm.io/zh/cli/install#--frozen-lockfile
31+
# 使用 pnpm 安装依赖
32+
- name: Install dependencies
33+
run: pnpm install --no-frozen-lockfile --ignore-scripts

0 commit comments

Comments
 (0)