@@ -2,7 +2,6 @@ name: NodeJS with Webpack
22
33on :
44 push :
5- branches : [ "develop" ]
65 workflow_dispatch :
76
87permissions :
@@ -13,7 +12,6 @@ permissions:
1312concurrency :
1413 group : " pages"
1514 cancel-in-progress : false
16-
1715jobs :
1816 build :
1917 environment :
@@ -22,28 +20,34 @@ jobs:
2220 runs-on : ubuntu-latest
2321
2422 steps :
25- - uses : actions/checkout@v4
26-
27- - name : Set up Node.js 20
28- uses : actions/setup-node@v3
29- with :
30- node-version : 20.x
31-
32- - name : Install Dependencies and Build
33- env :
34- APIHOST : ${{ vars.APIHOST }}
35- ASSETSHOST : ${{ vars.ASSETSHOST }}
36- run : |
37- npm install
38- npm run build
39-
40- - name : Upload build to GitHub Pages
41- uses : peaceiris/actions-gh-pages@v4
42- with :
43- github_token : ${{ secrets.GITHUB_TOKEN }}
44- publish_dir : ./build
45- publish_branch : build
46-
47- - name : Deploy to GitHub Pages
48- id : deployment
49- uses : actions/deploy-pages@v4
23+ - uses : actions/checkout@v4
24+
25+ - name : Use Node.js 20
26+ uses : actions/setup-node@v3
27+ with :
28+ node-version : 20.x
29+
30+ - name : Build
31+ env :
32+ APIHOST : ${{ vars.APIHOST }}
33+ ASSETSHOST : ${{ vars.ASSETSHOST }}
34+ run : |
35+ npm install
36+ npm run build
37+ - name : Setup Pages
38+ uses : actions/configure-pages@v5
39+ - name : Upload artifact
40+ uses : actions/upload-pages-artifact@v3
41+ with :
42+ path : ' ./build'
43+
44+ - name : Deploy
45+ uses : peaceiris/actions-gh-pages@v4
46+ with :
47+ github_token : ${{ secrets.GITHUB_TOKEN }}
48+ publish_dir : ./build
49+ publish_branch : build
50+
51+ - name : Deploy to GitHub Pages
52+ id : deployment
53+ uses : actions/deploy-pages@v4
0 commit comments