File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ name: Build & Deploy to GitHub Pages
33on :
44 push :
55 branches : [main]
6- pull_request :
7- branches : [main]
86
97permissions :
108 contents : read
@@ -36,13 +34,11 @@ jobs:
3634 run : npm run build
3735
3836 - name : Upload Pages artifact
39- if : github.ref == 'refs/heads/main'
4037 uses : actions/upload-pages-artifact@v3
4138 with :
4239 path : docs
4340
4441 deploy :
45- if : github.ref == 'refs/heads/main'
4642 needs : build
4743 runs-on : ubuntu-latest
4844 environment :
Original file line number Diff line number Diff line change 1+ name : PR Check
2+
3+ on :
4+ pull_request :
5+ branches : [main]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v4
13+
14+ - name : Set up Node
15+ uses : actions/setup-node@v4
16+ with :
17+ node-version : 20
18+ cache : npm
19+
20+ - name : Install dependencies
21+ run : npm ci
22+
23+ - name : Build site
24+ run : npm run build
You can’t perform that action at this time.
0 commit comments