@@ -2,48 +2,30 @@ name: Build Angular Application
2
2
3
3
on :
4
4
push :
5
- branches : [main]
5
+ branches :
6
+ - main
6
7
7
8
jobs :
8
- build-application :
9
+ build :
9
10
runs-on : ubuntu-latest
10
11
11
12
steps :
12
- - name : Checkout repository
13
- uses : actions/checkout@v3 # Corrected the version
13
+ - name : Checkout Repository
14
+ uses : actions/checkout@v3
14
15
15
- - name : Install dependencies
16
- run : npm ci --legacy-peer-deps # Keep this only if you have dependency issues
17
-
18
- - name : Build application
19
- run : npm run watch
20
-
21
- - name : Archive production artifact
22
- uses : actions/upload-artifact@v3 # Corrected the version
16
+ - name : Set up Node.js
17
+ uses : actions/setup-node@v3
23
18
with :
24
- name : dist
25
- path : dist/eventify-frontend # Make sure the path matches the actual output folder
19
+ node-version : ' 16.x' # Ensure you're using a compatible Node.js version
26
20
27
- deploy-application :
28
- name : Deploy
29
- needs : build-application
30
- runs-on : ubuntu-latest
21
+ - name : Install Dependencies
22
+ run : npm ci --legacy-peer-deps # This installs dependencies based on package-lock.json
31
23
32
- steps :
33
- - name : Checkout repository
34
- uses : actions/checkout@v3 # Corrected the version
24
+ - name : Build the Angular Application
25
+ run : npm run build -- --configuration=production
35
26
36
- - name : Download artifact
37
- uses : actions/download -artifact@v3 # Corrected the version
27
+ - name : Archive the Build Artifacts
28
+ uses : actions/upload -artifact@v3
38
29
with :
39
30
name : dist
40
- path : dist/eventify-frontend
41
-
42
- - name : Install Firebase CLI
43
- run : npm install -g firebase-tools
44
-
45
- - name : Deploy to Firebase
46
- run : |
47
- firebase deploy
48
- env :
49
- FIREBASE_TOKEN : ${{ secrets.FIREBASE_TOKEN }} # Ensure your Firebase token is correctly set in secrets
31
+ path : dist
0 commit comments