File tree Expand file tree Collapse file tree 1 file changed +20
-12
lines changed
Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Original file line number Diff line number Diff line change 1- name : NodeJS with Webpack
1+ name : NodeJS with Webpack & Deploy to GitHub Pages
22
33on :
44 push :
77 branches : [ "main" ]
88
99jobs :
10- build :
10+ build-and-deploy :
1111 runs-on : ubuntu-latest
12-
1312 strategy :
1413 matrix :
1514 node-version : [18.x, 20.x, 22.x]
1615
1716 steps :
18- - uses : actions/checkout@v4
17+ - uses : actions/checkout@v4
18+ with :
19+ persist-credentials : true # so gh-pages can push
20+
21+ - name : Use Node.js ${{ matrix.node-version }}
22+ uses : actions/setup-node@v4
23+ with :
24+ node-version : ${{ matrix.node-version }}
25+
26+ - name : Install dependencies
27+ run : npm ci
1928
20- - name : Use Node.js ${{ matrix.node-version }}
21- uses : actions/setup-node@v4
22- with :
23- node-version : ${{ matrix.node-version }}
29+ - name : Build
30+ run : npm run build
2431
25- - name : Build
26- run : |
27- npm install
28- npm run dev
32+ - name : Deploy to GitHub Pages
33+ uses : peaceiris/actions-gh-pages@v3
34+ with :
35+ github_token : ${{ secrets.GITHUB_TOKEN }}
36+ publish_dir : ./build
You can’t perform that action at this time.
0 commit comments