File tree Expand file tree Collapse file tree 4 files changed +376
-337
lines changed Expand file tree Collapse file tree 4 files changed +376
-337
lines changed Original file line number Diff line number Diff line change 1- name : Publish contents to GitHub pages.
1+ name : Build and deploy contents to Pages
22
33on :
44 push :
55 branches : ['main']
6+ pull_request :
67 workflow_dispatch :
78
89permissions :
910 contents : write
1011
11- concurrency :
12- group : ' pages'
13- cancel-in-progress : true
14-
1512jobs :
16- build-and-deploy :
13+ build :
14+ name : Build
1715 runs-on : ubuntu-latest
1816
1917 steps :
20- - name : Checkout
21- uses : actions/checkout@v4
18+ - uses : actions/checkout@v4
19+
20+ - name : Setup pnpm
21+ uses : pnpm/action-setup@v2
22+ with :
23+ version : 8
2224
2325 - name : Use Node 18.x
2426 uses : actions/setup-node@v3
2527 with :
2628 node-version : 18
27- cache : ' npm '
29+ cache : ' pnpm '
2830
2931 - name : Install and build
3032 run : |
31- npm install
32- npm run build
33+ pnpm install
34+ pnpm lint
35+ pnpm build
36+
37+ - name : Upload deployment build files
38+ uses : actions/upload-artifact@v3
39+ with :
40+ name : deployment-files
41+ path : ./dist
42+
43+ deploy :
44+ name : Deploy
45+ needs : build
46+ runs-on : ubuntu-latest
47+ if : github.ref == 'refs/heads/main'
48+ concurrency :
49+ group : ${{ github.workflow }}-${{ github.ref }}
50+ cancel-in-progress : true
51+
52+ steps :
53+ - uses : actions/checkout@v4
54+
55+ - name : Download artifact
56+ uses : actions/download-artifact@v3
57+ with :
58+ name : deployment-files
59+ path : ./dist
3360
34- - name : Host static page in gh-pages
61+ - name : Host in GitHub Pages
3562 uses : JamesIves/github-pages-deploy-action@v4
3663 with :
3764 branch : gh-pages
Original file line number Diff line number Diff line change 1515 "react-dom" : " ^18.2.0"
1616 },
1717 "devDependencies" : {
18- "@types/react" : " ^18.2.39 " ,
18+ "@types/react" : " ^18.2.41 " ,
1919 "@types/react-dom" : " ^18.2.17" ,
2020 "@typescript-eslint/eslint-plugin" : " ^6.13.1" ,
2121 "@typescript-eslint/parser" : " ^6.13.1" ,
2222 "@vitejs/plugin-react-swc" : " ^3.5.0" ,
23- "eslint" : " ^8.54 .0" ,
24- "eslint-config-prettier" : " ^9.0 .0" ,
23+ "eslint" : " ^8.55 .0" ,
24+ "eslint-config-prettier" : " ^9.1 .0" ,
2525 "eslint-plugin-prettier" : " ^5.0.1" ,
2626 "eslint-plugin-react" : " ^7.33.2" ,
2727 "eslint-plugin-react-hooks" : " ^4.6.0" ,
28- "eslint-plugin-react-refresh" : " ^0.4.4 " ,
28+ "eslint-plugin-react-refresh" : " ^0.4.5 " ,
2929 "prettier" : " ^3.1.0" ,
3030 "sass" : " ^1.69.5" ,
3131 "typescript" : " ^5.3.2" ,
You can’t perform that action at this time.
0 commit comments