Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds angular-deploy.yml pipeline #1

Merged
merged 11 commits into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/angular-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Deploy Angular Project to Firebase Hosting

on:
push:
branches:
- deployment/frontend

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "18"

- name: Install Firebase CLI
run: npm install -g firebase-tools@13.0.2

- name: Install Dependencies
run: npm install --legacy-peer-deps
working-directory: ./frontend

- name: Build Angular Project
run: npm run build_prod
working-directory: ./frontend

- name: Enable to Firebase webframeworks
run: firebase experiments:enable webframeworks
working-directory: ./frontend

- name: Setup Google Cloud Credentials
env:
SERVICE_ACCOUNT_KEY: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
run: |
echo "$SERVICE_ACCOUNT_KEY" > ./gcloud-service-key.json
echo "GOOGLE_APPLICATION_CREDENTIALS=${PWD}/gcloud-service-key.json" >> $GITHUB_ENV

- name: Deploy to Firebase Hosting
run: firebase deploy --only hosting
# env:
# FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} # Optional if we use service account, should be deleted later on
working-directory: ./frontend
20 changes: 20 additions & 0 deletions .github/workflows/firebase-hosting-merge.2yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# # This file was auto-generated by the Firebase CLI
# # https://github.com/firebase/firebase-tools

# name: Deploy to Firebase Hosting on merge
# 'on':
# push:
# branches:
# - deployment/prod
# jobs:
# build_and_deploy:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - run: npm ci && npm run build
# - uses: FirebaseExtended/action-hosting-deploy@v0
# with:
# repoToken: '${{ secrets.GITHUB_TOKEN }}'
# firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_KAWTHARUNA_PROD }}'
# channelId: live
# projectId: kawtharuna-prod
17 changes: 17 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.2yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# # This file was auto-generated by the Firebase CLI
# # https://github.com/firebase/firebase-tools

# name: Deploy to Firebase Hosting on PR
# 'on': pull_request
# jobs:
# build_and_preview:
# if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - run: npm ci && npm run build
# - uses: FirebaseExtended/action-hosting-deploy@v0
# with:
# repoToken: '${{ secrets.GITHUB_TOKEN }}'
# firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_KAWTHARUNA_PROD }}'
# projectId: kawtharuna-prod
1 change: 1 addition & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ yarn-error.log
/libpeerconnection.log
testem.log
/typings
.keys/

# System files
.DS_Store
Expand Down
8 changes: 5 additions & 3 deletions mobile/lib/src/modules/app_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ class MyApp extends StatelessWidget {
return MaterialApp.router(
title: envVariables.appName,
debugShowCheckedModeBanner: false,
theme: appTheme.isDarkMode
? appTheme.getDarkTheme
: appTheme.getLightTheme,
theme:
// appTheme.isDarkMode
// ? appTheme.getDarkTheme
// :
appTheme.getLightTheme,
// scaffoldMessengerKey: scaffoldMessengerKey,
locale: appLanguage.appLocal,
supportedLocales: Translations.delegate.supportedLocales,
Expand Down