Skip to content

Commit b260fbb

Browse files
Update buildAngular.yml
1 parent 3932b8f commit b260fbb

File tree

1 file changed

+15
-33
lines changed

1 file changed

+15
-33
lines changed

.github/workflows/buildAngular.yml

Lines changed: 15 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,30 @@ name: Build Angular Application
22

33
on:
44
push:
5-
branches: [main]
5+
branches:
6+
- main
67

78
jobs:
8-
build-application:
9+
build:
910
runs-on: ubuntu-latest
1011

1112
steps:
12-
- name: Checkout repository
13-
uses: actions/checkout@v3 # Corrected the version
13+
- name: Checkout Repository
14+
uses: actions/checkout@v3
1415

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
2318
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
2620

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
3123

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
3526

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
3829
with:
3930
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

Comments
 (0)