From 83c4ca8f6115c20de6452bf78efddced013ba530 Mon Sep 17 00:00:00 2001 From: Gururajj77 Date: Wed, 10 Apr 2024 16:54:30 +0530 Subject: [PATCH] firebase hosting --- .firebaserc | 2 +- .github/workflows/firebase-hosting-merge.yml | 20 +++++ .../firebase-hosting-pull-request.yml | 21 +++++ firebase.json | 23 +++-- .../certificate/certificate.component.html | 3 +- .../certificate/certificate.component.scss | 8 +- .../verified-popup.component.html | 4 +- y/index.html | 89 +++++++++++++++++++ 8 files changed, 156 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/firebase-hosting-merge.yml create mode 100644 .github/workflows/firebase-hosting-pull-request.yml create mode 100644 y/index.html diff --git a/.firebaserc b/.firebaserc index 6edf38a..8c01f9f 100644 --- a/.firebaserc +++ b/.firebaserc @@ -11,4 +11,4 @@ "projects": { "default": "edzeeta-certification" } -} \ No newline at end of file +} diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml new file mode 100644 index 0000000..be6ddf9 --- /dev/null +++ b/.github/workflows/firebase-hosting-merge.yml @@ -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: + - main +jobs: + build_and_deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm ci && npm run build + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_EDZEETA_CERTIFICATION }}' + channelId: live + projectId: edzeeta-certification diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml new file mode 100644 index 0000000..bf10a17 --- /dev/null +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -0,0 +1,21 @@ +# 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 +permissions: + checks: write + contents: read + pull-requests: write +jobs: + build_and_preview: + if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm ci && npm run build + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_EDZEETA_CERTIFICATION }}' + projectId: edzeeta-certification diff --git a/firebase.json b/firebase.json index a47d207..566b60e 100644 --- a/firebase.json +++ b/firebase.json @@ -1,9 +1,16 @@ { - "hosting": [ - { - "target": "edzeeta-certificate", - "source": ".", - "frameworksBackend": {} - } - ] -} \ No newline at end of file + "hosting": { + "public": "y", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } +} diff --git a/src/app/certificate/certificate.component.html b/src/app/certificate/certificate.component.html index c16f565..e3e1a6e 100644 --- a/src/app/certificate/certificate.component.html +++ b/src/app/certificate/certificate.component.html @@ -4,13 +4,14 @@ alt="edzeeta logo" />
+

Validate your Certificate

diff --git a/src/app/certificate/certificate.component.scss b/src/app/certificate/certificate.component.scss index 7f52e36..8604b33 100644 --- a/src/app/certificate/certificate.component.scss +++ b/src/app/certificate/certificate.component.scss @@ -1,6 +1,6 @@ .custom-img{ - width: 150px; - height: 150px; + width: 200px; + height: 200px; top: 0; left: 0; position: absolute; @@ -21,6 +21,10 @@ margin: 20px auto; font-family: "Montserrat", sans-serif; + .heading{ + font-weight: bold; + } + .custom-form { display: flex; justify-content: center; diff --git a/src/app/verified-popup/verified-popup.component.html b/src/app/verified-popup/verified-popup.component.html index 7731346..3bc0b72 100644 --- a/src/app/verified-popup/verified-popup.component.html +++ b/src/app/verified-popup/verified-popup.component.html @@ -8,10 +8,10 @@ Course: {{ userData.courseName }}

- Course Date: {{ userData.courseDate }} + Certificate Issued Date: {{ userData.courseDate }}

- Type of session: {{ userData.courseType }} + Type of Certificate: {{ userData.courseType }}

diff --git a/y/index.html b/y/index.html new file mode 100644 index 0000000..a1578ec --- /dev/null +++ b/y/index.html @@ -0,0 +1,89 @@ + + + + + + Welcome to Firebase Hosting + + + + + + + + + + + + + + + + + + + +
+

Welcome

+

Firebase Hosting Setup Complete

+

You're seeing this because you've successfully setup Firebase Hosting. Now it's time to go build something extraordinary!

+ Open Hosting Documentation +
+

Firebase SDK Loading…

+ + + +