Skip to content

Update

Update #2

Workflow file for this run

name: NodeJS with Webpack
on:
push:
branches: [main] # Simplified syntax for single-item arrays
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout code
uses: actions/checkout@v3 # Check out the latest code from the repository
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm' # This option automatically caches npm dependencies and replaces the separate cache step
- name: Install dependencies
run: npm install # Install all project dependencies
- name: Build the project with Webpack
run: npx webpack # Run webpack using npx to bundle the application
# Moving Forward: Add steps for additional commands, such as testing or deployment