Skip to content

Develop#4

Merged
esam-dev merged 2 commits intomainfrom
develop
Mar 10, 2026
Merged

Develop#4
esam-dev merged 2 commits intomainfrom
develop

Conversation

@esam-dev
Copy link
Owner

Cambios realizados:

  • Se configuró GitHub Actions para despliegue automático.
  • Se agregaron los flujos firebase-hosting-merge.yml y firebase-hosting-pull-request.yml.
  • Vinculación exitosa con el proyecto finanz-services de Firebase.

Validación:

  • El flujo de trabajo debe dispararse automáticamente al hacer merge en la rama de producción.

@qodo-code-review
Copy link

Review Summary by Qodo

Configure Firebase Hosting with GitHub Actions workflows

✨ Enhancement 📝 Documentation

Grey Divider

Walkthroughs

Description
• Configure Firebase Hosting deployment with GitHub Actions
• Add automated CI/CD workflows for merge and pull request events
• Update Firebase project configuration to finanz-services
• Enable automatic builds and deployments on main branch
Diagram
flowchart LR
  A["GitHub Repository"] -- "Push to main" --> B["firebase-hosting-merge.yml"]
  A -- "Pull Request" --> C["firebase-hosting-pull-request.yml"]
  B -- "Build & Deploy" --> D["Firebase Hosting<br/>finanz-services"]
  C -- "Build & Preview" --> D
Loading

Grey Divider

File Changes

1. .firebaserc ⚙️ Configuration changes +1/-1

Update Firebase project configuration

• Updated default Firebase project from expense-tracker-eee50 to finanz-services
• Aligns configuration with the new Firebase project for deployment

.firebaserc


2. .github/workflows/firebase-hosting-merge.yml ✨ Enhancement +20/-0

Add Firebase Hosting merge deployment workflow

• New workflow file for automatic deployment on merge to main branch
• Runs npm build and deploys to Firebase Hosting using official action
• Uses FIREBASE_SERVICE_ACCOUNT_FINANZ_SERVICES secret for authentication
• Deploys to live channel on finanz-services project

.github/workflows/firebase-hosting-merge.yml


3. .github/workflows/firebase-hosting-pull-request.yml ✨ Enhancement +21/-0

Add Firebase Hosting pull request preview workflow

• New workflow file for preview deployments on pull requests
• Builds and deploys preview versions for PR validation
• Includes security checks to prevent external PR deployments
• Uses same Firebase service account and finanz-services project

.github/workflows/firebase-hosting-pull-request.yml


Grey Divider

Qodo Logo

@qodo-code-review
Copy link

qodo-code-review bot commented Mar 10, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Deploys placeholder site 🐞 Bug ✓ Correctness
Description
The new deploy workflows run npm run build, but Firebase Hosting is configured to deploy the
public/ directory, which contains the default Firebase placeholder public/index.html rather than
the Vite build output. This will publish the placeholder page (or otherwise miss built assets) on PR
previews and live deploys.
Code

.github/workflows/firebase-hosting-merge.yml[R14-20]

+      - run: npm ci && npm run build
+      - uses: FirebaseExtended/action-hosting-deploy@v0
+        with:
+          repoToken: ${{ secrets.GITHUB_TOKEN }}
+          firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FINANZ_SERVICES }}
+          channelId: live
+          projectId: finanz-services
Evidence
Both workflows build the app, but firebase.json deploys the public/ folder; that folder’s
index.html is the default Firebase Hosting setup page, so the deployment will not serve the built
Vite app.

.github/workflows/firebase-hosting-merge.yml[13-20]
.github/workflows/firebase-hosting-pull-request.yml[15-21]
firebase.json[1-8]
public/index.html[1-7]
package.json[9-13]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
CI builds the Vite app (`npm run build`) but Firebase Hosting deploys the `public/` directory, which currently contains the Firebase default placeholder page. This causes preview/live deploys to not serve the built app.

### Issue Context
- Vite build is invoked in both workflows.
- Firebase Hosting deploy source is controlled by `firebase.json` (`hosting.public`).

### Fix Focus Areas
- firebase.json[1-16]
- .github/workflows/firebase-hosting-merge.yml[13-20]
- .github/workflows/firebase-hosting-pull-request.yml[15-21]
- public/index.html[1-20]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. No deploy concurrency 🐞 Bug ⛯ Reliability
Description
The merge-to-live workflow has no concurrency control, so multiple pushes to main can run
overlapping deploys and an older run can finish later and deploy an older commit to the live
channel. This can temporarily publish the wrong version under rapid successive merges.
Code

.github/workflows/firebase-hosting-merge.yml[R4-12]

+name: Deploy to Firebase Hosting on merge
+on:
+  push:
+    branches:
+      - main
+jobs:
+  build_and_deploy:
+    runs-on: ubuntu-latest
+    steps:
Evidence
The merge workflow defines a push trigger and job but has no concurrency block, meaning GitHub
Actions may run multiple instances in parallel for successive pushes.

.github/workflows/firebase-hosting-merge.yml[4-12]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
Multiple pushes to `main` can start overlapping workflow runs. Without concurrency control, an older run may complete after a newer one and deploy an older build to the live channel.

### Issue Context
This affects the live deployment workflow.

### Fix Focus Areas
- .github/workflows/firebase-hosting-merge.yml[4-20]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@github-actions
Copy link

Visit the preview URL for this PR (updated for commit 55884c6):

https://finanz-services--pr4-develop-vxcmm2ng.web.app

(expires Tue, 17 Mar 2026 18:55:38 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4905a912ab243faab8eac1b38a9b8711115b94d9

@esam-dev esam-dev merged commit 69438b7 into main Mar 10, 2026
2 checks passed
Comment on lines +14 to +20
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FINANZ_SERVICES }}
channelId: live
projectId: finanz-services

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Deploys placeholder site 🐞 Bug ✓ Correctness

The new deploy workflows run npm run build, but Firebase Hosting is configured to deploy the
public/ directory, which contains the default Firebase placeholder public/index.html rather than
the Vite build output. This will publish the placeholder page (or otherwise miss built assets) on PR
previews and live deploys.
Agent Prompt
### Issue description
CI builds the Vite app (`npm run build`) but Firebase Hosting deploys the `public/` directory, which currently contains the Firebase default placeholder page. This causes preview/live deploys to not serve the built app.

### Issue Context
- Vite build is invoked in both workflows.
- Firebase Hosting deploy source is controlled by `firebase.json` (`hosting.public`).

### Fix Focus Areas
- firebase.json[1-16]
- .github/workflows/firebase-hosting-merge.yml[13-20]
- .github/workflows/firebase-hosting-pull-request.yml[15-21]
- public/index.html[1-20]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant