Migrate from App Engine to Firebase Hosting - #1333
Conversation
ccf9a4a to
20f9f5e
Compare
|
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 |
7fa9785 to
b9bfa56
Compare
8f29b45 to
617afcf
Compare
Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
There was a problem hiding this comment.
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
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++; | |||
| ## 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. |


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
.firebasercconfiguring the defaulthttparchiveproject.firebase.jsonconfigured for static hosting fromdist, 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.app.yamland.gcloudignore..github/workflows/deploy.ymlto deploy to the Firebase Hosting live channel viaFirebaseExtended/action-hosting-deploy.2. CI/CD & Workflow Optimization
.github/workflows/test-website.ymlto eliminate duplicate builds.github.event.pull_request.head.repo.full_name == github.repository) so fork PRs run all tests without failing on missing secrets.test-website.ymlwith a lightweight nativenpm run lint:htmlstep usinghtmlhint..github/linters/.htmlhintrc_morechecksin favor of.github/linters/.htmlhintrc..github/workflows/linter.ymland centralized Dependabot auto-merge intest-website.yml.test-website.yml,predeploy.yml), enabled native npm caching inactions/setup-node@v7, and bumped.nvmrcandpackage.jsonengine constraints.3. Local Development & Scripts
firebase-toolstodevDependenciesand added an `"emulate": "firebase emulators:start --only hosting"" npm script.tools/scripts/run_and_test_website.shto launchnpm run emulate &with process traps for clean shutdown and port polling. Deleted obsolete Windowsrun_and_test_website.bat.public/static/htmlfromtools/test/test_status_codes.js, keeping the test suite purely focused on HTTP status codes and headers.public/static/htmlandpublic/static/jsrules from.gitignore.README.mdto reflect the Firebase emulator development commands.