Skip to content

Commit b2f6628

Browse files
authored
Create webpack.yml
1 parent 9c321a6 commit b2f6628

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/webpack.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: NodeJS with Webpack
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Use Node.js 18
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 18
17+
18+
- name: Build
19+
run: |
20+
npm install
21+
npm run build
22+
23+
- name: Upload GitHub Pages artifact
24+
uses: actions/upload-pages-artifact@v3.0.1
25+
with:
26+
path: build/
27+
28+
29+
deploy:
30+
needs: build
31+
runs-on: ubuntu-latest
32+
33+
permissions:
34+
pages: write # to deploy to Pages
35+
id-token: write # to verify the deployment originates from an appropriate source
36+
37+
# Deploy to the github-pages environment
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
42+
steps:
43+
- name: Deploy
44+
uses: actions/deploy-pages@v4.0.5
45+
46+

0 commit comments

Comments
 (0)