Skip to content

Migrate from App Engine to Firebase Hosting - #1333

Merged
max-ostapenko merged 20 commits into
mainfrom
migrate-firebase-hosting
Sep 20, 2026
Merged

max-ostapenko merged 20 commits into
mainfrom
migrate-firebase-hosting

Conversation

@max-ostapenko

@max-ostapenko max-ostapenko commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR completes the migration from Google App Engine to Firebase Hosting, modernizes the CI/CD test and deployment pipelines, and upgrades the project runtime to Node.js 26.

1. Firebase Hosting Migration

  • Project Configuration: Added .firebaserc configuring the default httparchive project.
  • Hosting Rules: Added firebase.json configured for static hosting from dist, clean URLs, security headers (X-Frame-Options, X-Content-Type-Options, Referrer-Policy, HSTS, CSP), immutable caching for fonts, and local emulator on port 8080.
  • Removed App Engine: Deleted obsolete app.yaml and .gcloudignore.
  • Deployment Workflow: Updated .github/workflows/deploy.yml to deploy to the Firebase Hosting live channel via FirebaseExtended/action-hosting-deploy.

2. CI/CD & Workflow Optimization

  • Consolidated Preview Deployments: Merged PR preview deployment directly into .github/workflows/test-website.yml to eliminate duplicate builds.
  • Fork PR Protection: Guarded preview deployment with a repository match check (github.event.pull_request.head.repo.full_name == github.repository) so fork PRs run all tests without failing on missing secrets.
  • Streamlined HTML Linting:
    • Replaced the multi-gigabyte Super-Linter Docker pull in test-website.yml with a lightweight native npm run lint:html step using htmlhint.
    • Removed duplicate .github/linters/.htmlhintrc_morechecks in favor of .github/linters/.htmlhintrc.
  • Cleaned Linter Workflow: Removed redundant Dependabot job from .github/workflows/linter.yml and centralized Dependabot auto-merge in test-website.yml.
  • Node 26 & Caching: Upgraded to Node.js 26 across all workflows (test-website.yml, predeploy.yml), enabled native npm caching in actions/setup-node@v7, and bumped .nvmrc and package.json engine constraints.

3. Local Development & Scripts

  • Local Emulator: Added firebase-tools to devDependencies and added an `"emulate": "firebase emulators:start --only hosting"" npm script.
  • Test Runner Refactoring: Simplified tools/scripts/run_and_test_website.sh to launch npm run emulate & with process traps for clean shutdown and port polling. Deleted obsolete Windows run_and_test_website.bat.
  • Test Suite Cleanup: Removed legacy HTML response dumping into public/static/html from tools/test/test_status_codes.js, keeping the test suite purely focused on HTTP status codes and headers.
  • Repository Housekeeping: Cleaned up obsolete public/static/html and public/static/js rules from .gitignore.
  • Documentation: Updated README.md to reflect the Firebase emulator development commands.

@max-ostapenko
max-ostapenko force-pushed the migrate-firebase-hosting branch from ccf9a4a to 20f9f5e Compare September 14, 2026 20:26
@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

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

https://httparchive--pr1333-migrate-firebase-hos-o2egoiz2.web.app

(expires Sun, 27 Sep 2026 19:06:00 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 1069cba7974889c25bacf4f0a19ddb6735592729

@tunetheweb tunetheweb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread tools/scripts/run_and_test_website.sh Outdated
@max-ostapenko
max-ostapenko force-pushed the migrate-firebase-hosting branch from 7fa9785 to b9bfa56 Compare September 20, 2026 14:20
@max-ostapenko
max-ostapenko changed the base branch from merge-har-docs to main September 20, 2026 14:20
@max-ostapenko
max-ostapenko force-pushed the migrate-firebase-hosting branch from 8f29b45 to 617afcf Compare September 20, 2026 14:52
Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Unconsumed response bodies can leak sockets or hang tests, and the Node.js 26 prerequisite is missing from setup documentation.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)
What changed in this PR

Migrates static hosting from App Engine to Firebase while modernizing Node.js, CI, deployment, testing, and local development.

Changes:

  • Adds Firebase Hosting configuration, emulator support, and deployment workflows.
  • Upgrades workflows and tooling to Node.js 26 with npm caching.
  • Simplifies website testing, HTML linting, and Dependabot automation.
File Description
.firebaserc Sets the default Firebase project.
firebase.json Configures hosting, headers, caching, and emulator.
.gcloudignore Removes obsolete App Engine exclusions.
app.yaml Removes App Engine configuration.
.nvmrc Selects Node.js 26.
.gitignore Removes obsolete generated-output exclusions.
package.json Adds Firebase tooling, HTMLHint, and deployment scripts.
README.md Updates local-running documentation.
.github/​workflows/​deploy.yml Deploys production to Firebase Hosting.
.github/​workflows/​predeploy.yml Updates predeployment build setup.
.github/​workflows/​test-website.yml Consolidates builds, tests, linting, and previews.
.github/​workflows/​linter.yml Removes duplicate Dependabot automation.
.github/​linters/​.htmlhintrc_morechecks Removes duplicate HTMLHint configuration.
tools/​scripts/​run_and_test_website.sh Runs tests against the Firebase emulator.
tools/​scripts/​run_and_test_website.bat Removes the obsolete Windows runner.
tools/​test/​test_status_codes.js Stops saving fetched HTML responses.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@@ -27,12 +25,6 @@ const test_status_code = async (page, status, location) => {
if (response.status === status && response.headers.get('location') === location) {
//console.log('Success - expected:', status, 'got:',response.status, 'for page:', page);
passes++;
Comment thread README.md
## Run Locally

This is an Astro-based web application for HTTPArchive.org. It requires **Node.js >= 24.0.0**.
This is an Astro-based web application for HTTPArchive.org.
@max-ostapenko
max-ostapenko merged commit 9dbf000 into main Sep 20, 2026
13 checks passed
@max-ostapenko
max-ostapenko deleted the migrate-firebase-hosting branch September 20, 2026 19:25
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.

3 participants