Skip to content

Commit 4926d2e

Browse files
Update buildAngular.yml
1 parent 1ebd530 commit 4926d2e

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

.github/workflows/buildAngular.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,32 @@ jobs:
1111

1212
steps:
1313
- name: Checkout Repository
14-
uses: actions/[email protected]
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '18.x' # Ensure the version matches your local environment
20+
21+
- name: Cache node_modules
22+
uses: actions/cache@v2
23+
with:
24+
path: node_modules
25+
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}
26+
restore-keys: |
27+
${{ runner.os }}-node_modules-
28+
29+
- name: Install Angular CLI
30+
run: npm install -g @angular/[email protected] # Replace with the Angular CLI version you're using
1531

16-
- name: Setup Node.js environment
17-
uses: actions/[email protected]
18-
1932
- name: Install Dependencies
2033
run: npm ci --legacy-peer-deps
2134

22-
- name: Build the Angular Application
23-
run: npm run build
35+
- name: Build Angular App
36+
run: npm run build -- --configuration=production
2437

25-
- name: Archive the Build Artifacts
26-
uses: actions/upload-artifact@v3
38+
- name: Upload Build Artifacts
39+
uses: actions/upload-artifact@v2
2740
with:
2841
name: dist
2942
path: dist

0 commit comments

Comments
 (0)