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, synchronize]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ strategy :
11+ matrix :
12+ node-version : [16, 20]
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v3
16+ with :
17+ ref : ${{ github.event.pull_request.head.ref }}
18+
19+ - name : Log GitHub event
20+ run : |
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 : ${{ matrix.node-version }}
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