From 6249738d8fb7e15e00ce0d12436fb6dcd6cb0340 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Thu, 11 Jan 2024 10:34:35 +0530 Subject: [PATCH] Implemented: support for firebase deployment on merge --- .firebaserc | 25 +++++++++++ .github/workflows/firebase-hosting-merge.yml | 16 +++++++ firebase.json | 45 ++++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 .firebaserc create mode 100644 .github/workflows/firebase-hosting-merge.yml create mode 100644 firebase.json diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 0000000..98c584b --- /dev/null +++ b/.firebaserc @@ -0,0 +1,25 @@ +{ + "projects": { + "default": "hotwax-digital-commerce", + "production": "digital-commerce-71eb8" + }, + "targets": { + "hotwax-digital-commerce": { + "hosting": { + "dev": [ + "order-routing-dev" + ], + "uat": [ + "order-routing-uat" + ] + } + }, + "digital-commerce-71eb8": { + "hosting": { + "prod": [ + "order-routing" + ] + } + } + } +} diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml new file mode 100644 index 0000000..6cf9fc9 --- /dev/null +++ b/.github/workflows/firebase-hosting-merge.yml @@ -0,0 +1,16 @@ +# 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: + call-workflow-in-another-repo: + uses: hotwax/dxp-components/.github/workflows/common-firebase-hosting-merge.yml@main + with: + config-path: .github/labeler.yml + secrets: + envPAT: ${{ secrets.envPAT }} + HOTWAX_PUBLIC_SECRET: ${{ secrets.HOTWAX_PUBLIC_SECRET }} \ No newline at end of file diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..6282c4c --- /dev/null +++ b/firebase.json @@ -0,0 +1,45 @@ +{ + "hosting": [ + { + "target": "prod", + "public": "dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ { + "source": "**", + "destination": "/index.html" + } ] + + }, + { + "target": "dev", + "public": "dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ { + "source": "**", + "destination": "/index.html" + } ] + + }, + { + "target": "uat", + "public": "dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ { + "source": "**", + "destination": "/index.html" + } ] + } + ] +}