File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,24 +2,39 @@ name: Build and Deploy Script
22on :
33 push :
44 branches :
5- - feature/workflow
5+ - main
6+ - feature/**
7+ pull_request :
8+ branches :
9+ - main
10+ - feature/**
611jobs :
712 build :
813 runs-on : ubuntu-latest
914 steps :
1015 - name : Checkout Repository
1116 uses : actions/checkout@v4
17+
1218 - name : Adding Node.js
1319 uses : actions/setup-node@v4
1420 with :
1521 node-version : 22.16.0
22+ cache : ' npm'
23+
1624 - name : Install Dependencies
1725 run : npm install
26+
27+ - name : Run Unit Tests
28+ run : npm test -- --watch=false --browsers=ChromeHeadless
29+
30+ - name : Build Angular App
31+ run : npm run build -- --configuration=production
32+
1833 - name : Build Angular App
1934 run : npm run build
20- - name : Deploy to gh pages
21- run : |
22- npx angular-cli-ghpages --dir=dist/angular-demo-application --no-silent
23- env :
24- CI : true
25- GH_TOKEN : ${{ secrets.GH_TOKEN }}
35+
36+ - name : Upload Build Artifact
37+ uses : actions/upload-artifact@v4
38+ with :
39+ name : angular-dist
40+ path : dist/
You can’t perform that action at this time.
0 commit comments