Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/npmbuildonpullrequest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: NPM Build on PR Open

on:
pull_request:
types: [opened, synchronize]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 20]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Log GitHub event
run: |
echo "PR head ref: ${{ github.event.pull_request.head.ref }}"
echo "PR head sha: ${{ github.event.pull_request.head.sha }}"

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Log Node.js and npm versions
run: |
echo "Node.js version: $(node --version)"
echo "npm version: $(npm --version)"

- name: Install dependencies
run: |
echo "Installing dependencies..."
npm install
echo "Dependencies installed."

- name: Run build
run: |
echo "Running build..."
npm run build
echo "Build completed."