File tree 2 files changed +40
-20
lines changed
2 files changed +40
-20
lines changed Original file line number Diff line number Diff line change 6
6
pull_request :
7
7
branches : [ main ]
8
8
9
+ env :
10
+ NODE_VER : 22.5
11
+
9
12
jobs :
10
13
lint :
11
14
runs-on : ubuntu-latest
12
15
steps :
13
16
- uses : actions/checkout@v4
14
- - name : Use Node.js 20.6.1
15
- uses : actions/setup-node@v4
17
+
18
+ - uses : pnpm/action-setup@v4
19
+ name : Install pnpm
16
20
with :
17
- node-version : 20.6.1
21
+ run_install : false
18
22
19
- - name : Setup
20
- run : npm i -g @antfu/ni
23
+ - name : Use Node.js ${{ env.NODE_VER }}
24
+ uses : actions/setup-node@v4
25
+ with :
26
+ node-version : ${{ env.NODE_VER }}
27
+ cache : ' pnpm'
21
28
22
29
- name : Install
23
- run : nci
30
+ run : pnpm i
24
31
25
32
- name : Lint
26
- run : nr lint
33
+ run : pnpm lint
27
34
28
35
build :
29
36
runs-on : ubuntu-latest
30
37
steps :
31
38
- uses : actions/checkout@v4
32
- - name : Use Node.js 20.6.1
33
- uses : actions/setup-node@v4
39
+
40
+ - uses : pnpm/action-setup@v4
41
+ name : Install pnpm
34
42
with :
35
- node-version : 20.6.1
43
+ run_install : false
36
44
37
- - name : Setup
38
- run : npm i -g @antfu/ni
45
+ - name : Use Node.js ${{ env.NODE_VER }}
46
+ uses : actions/setup-node@v4
47
+ with :
48
+ node-version : ${{ env.NODE_VER }}
49
+ cache : ' pnpm'
39
50
40
51
- name : Install
41
- run : nci
52
+ run : pnpm i
42
53
43
54
- name : Build
44
- run : nr build
55
+ run : pnpm build
Original file line number Diff line number Diff line change 7
7
# Allows you to run this workflow manually from the Actions tab
8
8
workflow_dispatch :
9
9
10
+ env :
11
+ NODE_VER : 22.5
12
+
10
13
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11
14
permissions :
12
15
contents : read
@@ -28,21 +31,27 @@ jobs:
28
31
uses : actions/checkout@v4
29
32
with :
30
33
fetch-depth : 0 # Required to calculate lastUpdated
31
- - name : Install pnpm
32
- uses : pnpm/action-setup@v3
34
+
35
+ - uses : pnpm/action-setup@v4
36
+ name : Install pnpm
33
37
with :
34
- version : 8
35
- - name : Setup Node
38
+ run_install : false
39
+
40
+ - name : Use Node.js ${{ env.NODE_VER }}
36
41
uses : actions/setup-node@v4
37
42
with :
38
- node-version : 20
39
- cache : pnpm
43
+ node-version : ${{ env.NODE_VER }}
44
+ cache : ' pnpm'
45
+
40
46
- name : Setup Pages
41
47
uses : actions/configure-pages@v4
48
+
42
49
- name : Install dependencies
43
50
run : pnpm i
51
+
44
52
- name : Build with VitePress
45
53
run : pnpm build
54
+
46
55
- name : Upload artifact
47
56
uses : actions/upload-pages-artifact@v3
48
57
with :
You can’t perform that action at this time.
0 commit comments