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
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…
+ + + +