From 35c3b99b83ec7c8dd250e50ca178246f89d60427 Mon Sep 17 00:00:00 2001 From: MuhammadAslam-K Date: Sun, 12 Nov 2023 23:01:45 +0530 Subject: [PATCH] Add Firebase workflow files --- .firebaserc | 5 +++++ .github/workflow/main.yml | 2 +- .github/workflows/firebase-hosting-merge.yml | 20 +++++++++++++++++++ .../firebase-hosting-pull-request.yml | 17 ++++++++++++++++ firebase.json | 16 +++++++++++++++ .../driver/addInfo/AddPersonlInfoPage.tsx | 8 ++++++-- .../driver/addInfo/AddVehicleInfoPage.tsx | 8 ++++++-- 7 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 .firebaserc create mode 100644 .github/workflows/firebase-hosting-merge.yml create mode 100644 .github/workflows/firebase-hosting-pull-request.yml create mode 100644 firebase.json diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 0000000..83e2f8b --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "bookat-87c98" + } +} diff --git a/.github/workflow/main.yml b/.github/workflow/main.yml index d719acb..a1c09f3 100644 --- a/.github/workflow/main.yml +++ b/.github/workflow/main.yml @@ -17,7 +17,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: "14" + node-version: "18" - name: Install Dependencies run: npm install diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml new file mode 100644 index 0000000..9c46dfc --- /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: + - master +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_BOOKAT_87C98 }}' + channelId: live + projectId: bookat-87c98 diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml new file mode 100644 index 0000000..5cdd9fe --- /dev/null +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -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_BOOKAT_87C98 }}' + projectId: bookat-87c98 diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..2c33c29 --- /dev/null +++ b/firebase.json @@ -0,0 +1,16 @@ +{ + "hosting": { + "public": "dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } +} diff --git a/src/pages/driver/addInfo/AddPersonlInfoPage.tsx b/src/pages/driver/addInfo/AddPersonlInfoPage.tsx index 6d984df..3b41843 100644 --- a/src/pages/driver/addInfo/AddPersonlInfoPage.tsx +++ b/src/pages/driver/addInfo/AddPersonlInfoPage.tsx @@ -1,10 +1,14 @@ +import Navbar from "../../../components/driver/common/Navbar" +import DriverFooter from "../../../components/driver/common/DriverFooter" import AddPersonalInfo from "../../../components/driver/AddPersonalAndVehicleInfo/AddPersonalInfo" function AddPersonlInfoPage() { return ( - <> +
+ - + +
) } diff --git a/src/pages/driver/addInfo/AddVehicleInfoPage.tsx b/src/pages/driver/addInfo/AddVehicleInfoPage.tsx index 613e0da..f72f914 100644 --- a/src/pages/driver/addInfo/AddVehicleInfoPage.tsx +++ b/src/pages/driver/addInfo/AddVehicleInfoPage.tsx @@ -1,10 +1,14 @@ +import Navbar from "../../../components/driver/common/Navbar" +import DriverFooter from "../../../components/driver/common/DriverFooter" import AddVehicleInfo from '../../../components/driver/AddPersonalAndVehicleInfo/AddVehicleInfo' function AddVehicleInfoPage() { return ( - <> +
+ - + +
) }