-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (32 loc) · 1.48 KB
/
webpack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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: Install Angular CLI globally
run: npm install -g @angular/cli@^18.0.0 # Install Angular CLI matching project version
- name: Ensure @angular-devkit/build-angular is installed
run: npm install --save-dev @angular-devkit/build-angular@^18.0.0 # Ensure necessary devkit is installed
- name: Build the project with Angular CLI
run: ng build --configuration development --verbose # Use verbose logging for better debugging info
# Uncomment below section if Webpack is used for manual bundling
# - name: Build the project with Webpack
# run: npx webpack --mode development # Run webpack using npx to bundle the application
# Moving Forward: Add steps for additional commands, such as testing or deployment