Skip to content

Commit bc9e135

Browse files
committed
added github workflow for npm rum build
1 parent c74ac66 commit bc9e135

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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."

0 commit comments

Comments
 (0)