From a9c2835c31e282752944c2c1778401f2a50f36ce Mon Sep 17 00:00:00 2001 From: MohammedMaaz Date: Fri, 4 Apr 2025 18:38:15 +0500 Subject: [PATCH 1/4] updated gcp project id and fierbase hosting --- .firebaserc | 8 ++++---- .../workflows/firebase-hosting-merge-dev.yml | 4 +++- .../workflows/firebase-hosting-merge-main.yml | 4 +++- .../firebase-hosting-pull-request-dev.yml | 19 +++++++++++++++++++ .../firebase-hosting-pull-request-main.yml | 19 +++++++++++++++++++ README.md | 4 ++-- package.json | 3 ++- 7 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/firebase-hosting-pull-request-dev.yml create mode 100644 .github/workflows/firebase-hosting-pull-request-main.yml diff --git a/.firebaserc b/.firebaserc index c67b671..d01250d 100644 --- a/.firebaserc +++ b/.firebaserc @@ -1,16 +1,16 @@ { "targets": { - "applied-abbey-378009": { + "rayon-gcp-starter": { "hosting": { "prod": [ - "rayon-react-starter" + "rayon-gcp-starter" ] } }, - "physikomatics-be": { + "rayon-gcp-starter": { "hosting": { "dev": [ - "rayon-react-starter-dev" + "rayon-gcp-starter" ] } } diff --git a/.github/workflows/firebase-hosting-merge-dev.yml b/.github/workflows/firebase-hosting-merge-dev.yml index f06361e..13b22d1 100644 --- a/.github/workflows/firebase-hosting-merge-dev.yml +++ b/.github/workflows/firebase-hosting-merge-dev.yml @@ -3,6 +3,8 @@ name: Deploy to Firebase Hosting on merge (dev) push: branches: - dev + workflow_dispatch: + jobs: build_and_deploy: permissions: write-all @@ -30,5 +32,5 @@ jobs: repoToken: "${{ secrets.GITHUB_TOKEN }}" firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_DEV }}" channelId: live - projectId: physikomatics-be + projectId: rayon-gcp-starter target: dev diff --git a/.github/workflows/firebase-hosting-merge-main.yml b/.github/workflows/firebase-hosting-merge-main.yml index 25c1934..cbb1716 100755 --- a/.github/workflows/firebase-hosting-merge-main.yml +++ b/.github/workflows/firebase-hosting-merge-main.yml @@ -3,6 +3,8 @@ name: Deploy to Firebase Hosting on merge (main) push: branches: - main + workflow_dispatch: + jobs: build_and_deploy: permissions: write-all @@ -30,5 +32,5 @@ jobs: repoToken: "${{ secrets.GITHUB_TOKEN }}" firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROD }}" channelId: live - projectId: applied-abbey-378009 + projectId: rayon-gcp-starter target: prod diff --git a/.github/workflows/firebase-hosting-pull-request-dev.yml b/.github/workflows/firebase-hosting-pull-request-dev.yml new file mode 100644 index 0000000..45892eb --- /dev/null +++ b/.github/workflows/firebase-hosting-pull-request-dev.yml @@ -0,0 +1,19 @@ +name: Deploy to Firebase Hosting on PR (dev) +on: + pull_request: + branches: + - dev + +jobs: + build_and_preview: + permissions: write-all + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: yarn install --frozen-lockfile && npm run build:dev + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: "${{ secrets.GITHUB_TOKEN }}" + firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_DEV }}" + projectId: rayon-gcp-starter + target: dev diff --git a/.github/workflows/firebase-hosting-pull-request-main.yml b/.github/workflows/firebase-hosting-pull-request-main.yml new file mode 100644 index 0000000..442d8e2 --- /dev/null +++ b/.github/workflows/firebase-hosting-pull-request-main.yml @@ -0,0 +1,19 @@ +name: Deploy to Firebase Hosting on PR (main) +on: + pull_request: + branches: + - main + +jobs: + build_and_preview: + permissions: write-all + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: yarn install --frozen-lockfile && npm run build:prod + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: "${{ secrets.GITHUB_TOKEN }}" + firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROD }}" + projectId: rayon-gcp-starter + target: prod diff --git a/README.md b/README.md index 53b753d..4d91638 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Rayon React Starter is an opinionated starter kit designed to scaffold React projects quickly with a comprehensive and well-structured environment. Built with a modern tech stack and batteries included, it helps you start building your project in no time. -[Live Demo](https://rayon-react-starter.web.app/) +[Live Demo](https://rayon-gcp-starter.web.app/) ## Tech Stack @@ -44,7 +44,7 @@ Ensure you have the following installed: 1. Clone the repository: ```bash git clone https://github.com/rayonstudios/rayon_react_starter - cd rayon-react-starter + cd rayon-gcp-starter ``` 2. Install dependencies: ```bash diff --git a/package.json b/package.json index 282b095..42b525c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "name": "rayon_react_starter", "private": true, - "version": "0.0.3", + "version": "1.4", + "description": "Rayon React Starter is an opinionated starter kit designed to scaffold React projects quickly with a comprehensive and well-structured environment. Built with a modern tech stack and batteries included, it helps you start building your project in no time.", "type": "module", "scripts": { "dev": "vite", From 392bbc5ab4921188fd1de58df5978ae8b16c3d44 Mon Sep 17 00:00:00 2001 From: MohammedMaaz Date: Fri, 4 Apr 2025 18:41:05 +0500 Subject: [PATCH 2/4] update firebase service account secrets in workflow files --- .github/workflows/firebase-hosting-merge-dev.yml | 2 +- .github/workflows/firebase-hosting-merge-main.yml | 2 +- .github/workflows/firebase-hosting-pull-request-dev.yml | 2 +- .github/workflows/firebase-hosting-pull-request-main.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/firebase-hosting-merge-dev.yml b/.github/workflows/firebase-hosting-merge-dev.yml index 13b22d1..fee4a19 100644 --- a/.github/workflows/firebase-hosting-merge-dev.yml +++ b/.github/workflows/firebase-hosting-merge-dev.yml @@ -30,7 +30,7 @@ jobs: - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: "${{ secrets.GITHUB_TOKEN }}" - firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_DEV }}" + firebaseServiceAccount: "${{ secrets.SECRETJSON_DEV }}" channelId: live projectId: rayon-gcp-starter target: dev diff --git a/.github/workflows/firebase-hosting-merge-main.yml b/.github/workflows/firebase-hosting-merge-main.yml index cbb1716..e5769fb 100755 --- a/.github/workflows/firebase-hosting-merge-main.yml +++ b/.github/workflows/firebase-hosting-merge-main.yml @@ -30,7 +30,7 @@ jobs: - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: "${{ secrets.GITHUB_TOKEN }}" - firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROD }}" + firebaseServiceAccount: "${{ secrets.SECRETJSON_PROD }}" channelId: live projectId: rayon-gcp-starter target: prod diff --git a/.github/workflows/firebase-hosting-pull-request-dev.yml b/.github/workflows/firebase-hosting-pull-request-dev.yml index 45892eb..612f011 100644 --- a/.github/workflows/firebase-hosting-pull-request-dev.yml +++ b/.github/workflows/firebase-hosting-pull-request-dev.yml @@ -14,6 +14,6 @@ jobs: - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: "${{ secrets.GITHUB_TOKEN }}" - firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_DEV }}" + firebaseServiceAccount: "${{ secrets.SECRETJSON_DEV }}" projectId: rayon-gcp-starter target: dev diff --git a/.github/workflows/firebase-hosting-pull-request-main.yml b/.github/workflows/firebase-hosting-pull-request-main.yml index 442d8e2..6b505bc 100644 --- a/.github/workflows/firebase-hosting-pull-request-main.yml +++ b/.github/workflows/firebase-hosting-pull-request-main.yml @@ -14,6 +14,6 @@ jobs: - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: "${{ secrets.GITHUB_TOKEN }}" - firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROD }}" + firebaseServiceAccount: "${{ secrets.SECRETJSON_PROD }}" projectId: rayon-gcp-starter target: prod From 51cc7cd88302b8f9bf515c35b9a4100d8a5a8383 Mon Sep 17 00:00:00 2001 From: MohammedMaaz Date: Fri, 4 Apr 2025 20:05:33 +0500 Subject: [PATCH 3/4] update live demo link in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d91638..84da5df 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Rayon React Starter is an opinionated starter kit designed to scaffold React projects quickly with a comprehensive and well-structured environment. Built with a modern tech stack and batteries included, it helps you start building your project in no time. -[Live Demo](https://rayon-gcp-starter.web.app/) +[Live Demo](https://fe.starters.rayonstudios.com/) ## Tech Stack From 08a1800fc974821e7ff32e03b6021ebb9f52b3a5 Mon Sep 17 00:00:00 2001 From: MohammedMaaz Date: Fri, 4 Apr 2025 20:07:10 +0500 Subject: [PATCH 4/4] refactor workflow names for clarity in Firebase Hosting deployments --- .github/workflows/firebase-hosting-merge-dev.yml | 2 +- .github/workflows/firebase-hosting-merge-main.yml | 2 +- .github/workflows/firebase-hosting-pull-request-dev.yml | 2 +- .github/workflows/firebase-hosting-pull-request-main.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/firebase-hosting-merge-dev.yml b/.github/workflows/firebase-hosting-merge-dev.yml index fee4a19..29bd95e 100644 --- a/.github/workflows/firebase-hosting-merge-dev.yml +++ b/.github/workflows/firebase-hosting-merge-dev.yml @@ -1,4 +1,4 @@ -name: Deploy to Firebase Hosting on merge (dev) +name: Deploy to Firebase Hosting - Dev "on": push: branches: diff --git a/.github/workflows/firebase-hosting-merge-main.yml b/.github/workflows/firebase-hosting-merge-main.yml index e5769fb..62fa129 100755 --- a/.github/workflows/firebase-hosting-merge-main.yml +++ b/.github/workflows/firebase-hosting-merge-main.yml @@ -1,4 +1,4 @@ -name: Deploy to Firebase Hosting on merge (main) +name: Deploy to Firebase Hosting - Prod "on": push: branches: diff --git a/.github/workflows/firebase-hosting-pull-request-dev.yml b/.github/workflows/firebase-hosting-pull-request-dev.yml index 612f011..2ac6539 100644 --- a/.github/workflows/firebase-hosting-pull-request-dev.yml +++ b/.github/workflows/firebase-hosting-pull-request-dev.yml @@ -1,4 +1,4 @@ -name: Deploy to Firebase Hosting on PR (dev) +name: Preview deploy to Firebase Hosting on PR (dev) on: pull_request: branches: diff --git a/.github/workflows/firebase-hosting-pull-request-main.yml b/.github/workflows/firebase-hosting-pull-request-main.yml index 6b505bc..4c17ba7 100644 --- a/.github/workflows/firebase-hosting-pull-request-main.yml +++ b/.github/workflows/firebase-hosting-pull-request-main.yml @@ -1,4 +1,4 @@ -name: Deploy to Firebase Hosting on PR (main) +name: Preview deploy to Firebase Hosting on PR (main) on: pull_request: branches: