File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : NPM Build on PR Open
2
+
3
+ on :
4
+ pull_request :
5
+ types : [opened]
6
+
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout code
12
+ uses : actions/checkout@v3
13
+ with :
14
+ ref : ${{ github.event.pull_request.head.ref }}
15
+ env :
16
+ GITHUB_EVENT : ${{ toJson(github.event) }}
17
+
18
+ - name : Log GitHub event
19
+ run : |
20
+ echo "GitHub event: $GITHUB_EVENT"
21
+ echo "PR head ref: ${{ github.event.pull_request.head.ref }}"
22
+ echo "PR head sha: ${{ github.event.pull_request.head.sha }}"
23
+
24
+ - name : Setup Node.js
25
+ uses : actions/setup-node@v3
26
+ with :
27
+ node-version : " 18"
28
+
29
+ - name : Log Node.js and npm versions
30
+ run : |
31
+ echo "Node.js version: $(node --version)"
32
+ echo "npm version: $(npm --version)"
33
+
34
+ - name : Install dependencies
35
+ run : |
36
+ echo "Installing dependencies..."
37
+ npm install
38
+ echo "Dependencies installed."
39
+
40
+ - name : Run build
41
+ run : |
42
+ echo "Running build..."
43
+ npm run build
44
+ echo "Build completed."
You can’t perform that action at this time.
0 commit comments