66 push :
77 branches : ['main']
88 pull_request :
9- branches : ['main']
109permissions :
1110 contents : read
1211 pages : write
@@ -23,39 +22,57 @@ jobs:
2322 # node-version: [16.x, 18.x]
2423 # steps:
2524 # - name: Checkout 🛎️
26- # uses: actions/checkout@v4
25+ # uses: actions/checkout@v6
2726 # - name: Linting
28- # uses: actions/setup-node@v3
27+ # uses: actions/setup-node@v6
2928 # with: ${{ matrix.node-version }}
3029 # - run: npm install
3130 # - run: npm run lint
3231
33- build-and-deploy :
34- name : Build & Deploying
32+ build :
33+ name : Build
3534 # needs: lint
3635 runs-on : ubuntu-latest
37- environment :
38- name : github-pages
39- url : ${{ steps.deployment.outputs.page_url }}
4036 strategy :
4137 matrix :
4238 node-version : [18.18.0]
4339 steps :
4440 - name : 🛎️ Checkout
45- uses : actions/checkout@v4
41+ uses : actions/checkout@v6
42+
4643 - name : 🚧 Build with Node.js ${{ matrix.node-version }}
47- uses : actions/setup-node@v3
44+ uses : actions/setup-node@v6
4845 with :
4946 node-version : ${{ matrix.node-version }}
5047 cache : ' npm'
5148 - run : npm install
5249 - run : npm run build
50+
51+ deploy :
52+ if : github.ref == 'refs/heads/main'
53+ name : Deploying
54+ needs : build
55+ runs-on : ubuntu-latest
56+ strategy :
57+ matrix :
58+ node-version : [18.18.0]
59+ environment :
60+ name : github-pages
61+ url : ${{ steps.deployment.outputs.page_url }}
62+ steps :
5363 # Avoid fresh page 404 result
5464 - run : cp dist/index.html dist/404.html
55- - name : 🚀 Deploying
56- uses : actions/configure-pages@v3
57- - uses : actions/upload-pages-artifact@v2
65+
66+ - name : 🚀 Configuring
67+ uses : actions/configure-pages@v5
68+
69+ - name : ☁️ Uploading
70+ uses : actions/upload-pages-artifact@v4
5871 with :
5972 path : ' ./dist'
60- - uses : actions/deploy-pages@v1
73+
74+ - name : ⚙️ Deploying Pages
75+ uses : actions/deploy-pages@v4
76+
6177 - run : echo '✅ Success deployed!'
78+
0 commit comments