File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,23 +12,22 @@ permissions:
1212jobs :
1313 build :
1414 runs-on : ubuntu-latest
15- strategy :
16- matrix :
17- node-version : [22.x]
1815 steps :
19- - uses : actions/checkout@v4
20- - name : Setup Nodejs ${{ matrix.node-version }}
16+ - name : Checkout Git
17+ uses : actions/checkout@v4
18+ - name : Setup Nodejs
2119 uses : actions/setup-node@v4
2220 with :
23- node-version : ${{ matrix.node-version }}
24- - name : Build
25- run : |
26- npm install
27- npm run build
28- - name : Upload static site to Pages
21+ node-version : latest
22+ cache : npm # 因为cache依赖package.json 所以需要先checkout
23+ - name : Npm Install
24+ run : npm install
25+ - name : Npm Build
26+ run : npm run build
27+ - name : Upload Pages
2928 uses : actions/upload-pages-artifact@v3
3029 with :
31- path : ./dist # 就是之前 peaceiris 的 publish_dir
30+ path : ./dist # 部署编译后的文件
3231 deploy :
3332 needs : build
3433 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments