Skip to content

Integrate Firebase Hosting for automated deployment (#45)#60

Closed
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1781876471-firebase-hosting
Closed

Integrate Firebase Hosting for automated deployment (#45)#60
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1781876471-firebase-hosting

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Firebase Hosting configuration and CI/CD workflows so the app can be deployed to Firebase automatically.

New files:

  • firebase.json — serves Vite's dist/ directory, SPA rewrite (** → /index.html), and long-lived cache headers on /assets/** and *.js|css
  • .firebaserc — default project alias (placeholder servio-app, update to your actual project ID)
  • .github/workflows/firebase-deploy.yml — builds and deploys to the live channel on every push to main, using FirebaseExtended/action-hosting-deploy@v0
  • .github/workflows/firebase-preview.yml — builds and deploys a preview channel on every PR (URL posted as a PR comment), scoped to same-repo PRs only

Modified files:

  • package.json — added deploy and deploy:preview scripts for manual deployment via Firebase CLI
  • .gitignore — added .firebase/ cache directory
  • README.md — added full deployment section: prerequisites, env vars, manual deploy, CI/CD setup, and required GitHub secrets table

Required setup after merge:

  1. Set FIREBASE_SERVICE_ACCOUNT and VITE_FIREBASE_* secrets in GitHub repo settings
  2. Update the project ID in .firebaserc to match the actual Firebase project

Closes #45

Link to Devin session: https://app.devin.ai/sessions/ee17ee110bd04a2296d7047fe7c01b0d
Requested by: @hrx01-dev

Summary by CodeRabbit

  • Chores
    • Set up Firebase Hosting infrastructure for application deployment
    • Configured automated deployment pipelines for production and pull request previews
  • Documentation
    • Added deployment instructions to README

- Add firebase.json with SPA rewrites and cache headers for Vite dist/ output
- Add .firebaserc with default project configuration
- Add GitHub Actions workflow for production deploy on main branch push
- Add GitHub Actions workflow for PR preview deployments
- Add deploy and deploy:preview npm scripts
- Add .firebase/ to .gitignore
- Update README with deployment instructions and required secrets

Closes #45

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Firebase Hosting is configured via new .firebaserc and firebase.json files. Two GitHub Actions workflows are added for production deployment on main pushes and PR preview deployments. Local deploy scripts are added to package.json, .firebase/ is gitignored, and the README gains a full deployment section.

Changes

Firebase Hosting Deployment Setup

Layer / File(s) Summary
Firebase hosting config and local deploy tooling
.firebaserc, firebase.json, package.json, .gitignore
.firebaserc sets the default project to servio-app. firebase.json points public to dist, adds a SPA rewrite to /index.html, and sets immutable Cache-Control headers for /assets/**, *.js, and *.css. package.json gains deploy and deploy:preview scripts. .gitignore excludes .firebase/.
GitHub Actions CI/CD workflows and deployment docs
.github/workflows/firebase-deploy.yml, .github/workflows/firebase-preview.yml, README.md
firebase-deploy.yml triggers on main pushes and manual dispatch, builds with Vite/Firebase secrets, and deploys to channelId: live. firebase-preview.yml triggers on pull requests from the same repository and deploys to a preview channel. Both use concurrency groups with in-progress cancellation. README adds prerequisites, env variable table, manual deploy steps, secrets reference, and CI/CD flow description.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hippity-hop, the deploy is set,
Firebase Hosting — the best bet yet!
Push to main and watch it fly,
Preview channels reach the sky.
Config files all neat in a row,
This bunny's ready for the show! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Integrate Firebase Hosting for automated deployment (#45)' directly and clearly summarizes the main purpose of the PR—adding Firebase Hosting integration and automation.
Linked Issues check ✅ Passed All objectives from issue #45 are met: Firebase Hosting is configured (firebase.json), config files are added (.firebaserc), deployment scripts created (deploy/deploy:preview in package.json), GitHub Actions CI/CD workflows configured, environment variables documented, and comprehensive README deployment section added.
Out of Scope Changes check ✅ Passed All changes are directly scoped to Firebase Hosting integration—configuration files, CI/CD workflows, deployment scripts, and documentation. No unrelated modifications are present in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch devin/1781876471-firebase-hosting

Comment @coderabbitai help to get the list of available commands and usage tips.

@hrx01-dev hrx01-dev self-requested a review June 19, 2026 13:44

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/firebase-deploy.yml:
- Around line 21-23: Pin the GitHub Actions to specific commit hashes instead of
version tags for supply-chain security. Replace the version tags (such as `@v4` in
actions/checkout and `@v0` in other actions) with their corresponding full commit
hashes throughout the workflow file. Look up the exact commit hash for each
action version from the respective action repositories on GitHub, then update
each uses statement to reference the immutable commit hash instead of the
mutable version tag to ensure reproducible and auditable CI/CD deployments.
- Around line 21-23: The checkout action using `actions/checkout@v4` is missing
the `persist-credentials: false` configuration which leaves Git credentials in
the workflow's git config. Add `persist-credentials: false` as a parameter to
the checkout action to prevent credentials from being persisted and potentially
exposed in logs or artifacts if a later workflow step is compromised.

In @.github/workflows/firebase-preview.yml:
- Around line 22-23: Pin the GitHub Actions in the firebase-preview.yml workflow
to specific commit hashes instead of version tags for supply-chain security.
Replace the unpinned action references (actions/checkout@v4 and any other
actions in the sections spanning lines 25-29 and 46-50) with their corresponding
full commit hash format (e.g., actions/checkout@<hash>). Use the same commit
hashes that are already applied in the production workflow to maintain
consistency across all CI/CD workflows.
- Around line 22-23: The Checkout step using actions/checkout@v4 is missing the
persist-credentials: false parameter, which leaves Git credentials in the git
config after checkout completes. Add the persist-credentials: false input
parameter to the checkout action to prevent credentials from being persisted in
the git configuration, mitigating the security risk of credential leakage in the
workflow.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 45aa5808-8af0-427f-821f-7ad61ada378a

📥 Commits

Reviewing files that changed from the base of the PR and between a180038 and 93f3822.

📒 Files selected for processing (7)
  • .firebaserc
  • .github/workflows/firebase-deploy.yml
  • .github/workflows/firebase-preview.yml
  • .gitignore
  • README.md
  • firebase.json
  • package.json

Comment on lines +21 to +23
- name: Checkout
uses: actions/checkout@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚖️ Poor tradeoff

Pin GitHub Actions to specific commit hashes for supply-chain security.

Three actions are unpinned (@v4 and @v0 tags). Tags can be moved or compromised; pin to immutable commit hashes to ensure reproducible, auditable CI/CD.

🔒 Proposed fixes for pinned action hashes
       - name: Checkout
-        uses: actions/checkout@v4
+        uses: actions/checkout@a5ac7e51b41094c7f3ba2a8547355d5e79c575f7  # v4.1.6
       - name: Set up Node.js
-        uses: actions/setup-node@v4
+        uses: actions/setup-node@60edb5dd545a775178fac7f3e464e8ff4f5296be  # v4.0.2
       - name: Deploy to Firebase Hosting
-        uses: FirebaseExtended/action-hosting-deploy@v0
+        uses: FirebaseExtended/action-hosting-deploy@16cfa59e21b9e3a2e23a41e4f0420a42a1c6ef30  # v0.8.1

Note: Verify these are the latest compatible versions by checking the action repositories before merging. Use the @actions/ or Firebase release tags to find the exact commit hash for each version.

Also applies to: 25-28, 45-50

🧰 Tools
🪛 zizmor (1.25.2)

[warning] 21-22: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 22-22: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/firebase-deploy.yml around lines 21 - 23, Pin the GitHub
Actions to specific commit hashes instead of version tags for supply-chain
security. Replace the version tags (such as `@v4` in actions/checkout and `@v0` in
other actions) with their corresponding full commit hashes throughout the
workflow file. Look up the exact commit hash for each action version from the
respective action repositories on GitHub, then update each uses statement to
reference the immutable commit hash instead of the mutable version tag to ensure
reproducible and auditable CI/CD deployments.

Source: Linters/SAST tools


⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add persist-credentials: false to prevent credential leakage.

The checkout action leaves Git credentials in the workflow's git config, which could be exposed in logs or artifacts if a later step is compromised.

🔐 Proposed fix
       - name: Checkout
         uses: actions/checkout@v4
+        with:
+          persist-credentials: false
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 21-22: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 22-22: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/firebase-deploy.yml around lines 21 - 23, The checkout
action using `actions/checkout@v4` is missing the `persist-credentials: false`
configuration which leaves Git credentials in the workflow's git config. Add
`persist-credentials: false` as a parameter to the checkout action to prevent
credentials from being persisted and potentially exposed in logs or artifacts if
a later workflow step is compromised.

Comment on lines +22 to +23
- name: Checkout
uses: actions/checkout@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚖️ Poor tradeoff

Pin GitHub Actions to specific commit hashes for supply-chain security.

Same unpinned action issue as the production workflow. Apply the same hashes to ensure consistency across workflows.

🔒 Proposed fixes for pinned action hashes
       - name: Checkout
-        uses: actions/checkout@v4
+        uses: actions/checkout@a5ac7e51b41094c7f3ba2a8547355d5e79c575f7  # v4.1.6
       - name: Set up Node.js
-        uses: actions/setup-node@v4
+        uses: actions/setup-node@60edb5dd545a775178fac7f3ba2a8547355d5e79c575f7  # v4.0.2
       - name: Deploy Preview to Firebase Hosting
-        uses: FirebaseExtended/action-hosting-deploy@v0
+        uses: FirebaseExtended/action-hosting-deploy@16cfa59e21b9e3a2e23a41e4f0420a42a1c6ef30  # v0.8.1

Note: Use the same pinned versions as the production workflow to keep CI/CD consistent.

Also applies to: 25-29, 46-50

🧰 Tools
🪛 zizmor (1.25.2)

[warning] 22-23: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 23-23: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/firebase-preview.yml around lines 22 - 23, Pin the GitHub
Actions in the firebase-preview.yml workflow to specific commit hashes instead
of version tags for supply-chain security. Replace the unpinned action
references (actions/checkout@v4 and any other actions in the sections spanning
lines 25-29 and 46-50) with their corresponding full commit hash format (e.g.,
actions/checkout@<hash>). Use the same commit hashes that are already applied in
the production workflow to maintain consistency across all CI/CD workflows.

Source: Linters/SAST tools


⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add persist-credentials: false to prevent credential leakage.

Same security concern as production workflow: checkout leaves Git credentials in git config.

🔐 Proposed fix
       - name: Checkout
         uses: actions/checkout@v4
+        with:
+          persist-credentials: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 22-23: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 23-23: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/firebase-preview.yml around lines 22 - 23, The Checkout
step using actions/checkout@v4 is missing the persist-credentials: false
parameter, which leaves Git credentials in the git config after checkout
completes. Add the persist-credentials: false input parameter to the checkout
action to prevent credentials from being persisted in the git configuration,
mitigating the security risk of credential leakage in the workflow.

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Superseded by new PR with fix for deploy step condition. Branch protection rules prevent pushing additional commits to this branch.

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.

Integrate Firebase Hosting for Automated Deployment

1 participant