Deployment - msupino/NavigationApp GitHub Wiki

🇮🇱 עברית

Deployment

NavAid is a static GitHub Pages application assembled by .github/workflows/deploy.yml.

Public URLs

Target URL
main production https://navaid.supino.org/
dev staging https://navaid.supino.org/staging/

docs/CNAME configures the navaid.supino.org custom domain. The trusted Pages artifact maps main/docs/ to / and dev/docs/ to /staging/.

A pull request is published, at https://navaid.supino.org/pr/NNN/, and the workflow comments the link on the PR. It is rebuilt on every push and is not indexed.

Read that URL as "this branch, running on the production origin". The preview gets its own storage namespace and no service worker, but a path prefix is not an origin boundary: same-origin code can still reach the live app's saved routes, settings and BYOK/Drive credentials. Open a preview the way you would run that branch locally — i.e. having looked at what it does. Chart tiles are the one thing it does not share: a preview draws them from our own mirror, never from flight-maps.com (see Map Layers).

Branch workflow

All changes use an issue and feature branch from updated dev, then a PR to dev. Direct pushes to main or dev are not the normal workflow. A reviewed dev release is promoted to main by maintainers through a separate PR.

Workflow outline

  1. lint mechanically runs node --check for every docs/app/**/*.js and docs/i18n/**/*.js, plus docs/sw.js; it also validates the current JSON, HTML, XML, spelling, and shared cache-bust placeholders.
  2. build checks out main and dev, assembles production/staging, and rewrites ?v=, dataset URLs, NavAid.version, and the service-worker cache name to each branch's short SHA.
  3. The assembled artifact includes same-repository PR previews. Artifact E2E checks the rewritten preview and verifies its commit SHA.
  4. The Pages deployment publishes production, staging and eligible previews. PR deployment records and the bot comment identify the published preview SHA. Fork PRs are not published. Consult the current workflow for job permissions and event conditions; a published preview is not an isolated test origin.

Pages publishes are serialized with cancel-in-progress: false.

CI and rollback

.github/workflows/ci.yml runs the complete Playwright suite against a local server, split across six shards (e2e-shard (1..6), gated by the required e2e check); the Deploy job runs the rewritten artifact the same way (e2e-deployed-shard, gated by e2e-deployed). Six, not four: at four each shard ran 16-19 min against its 20 min cap, and a slow runner day cut every shard off mid-run.

Rollback production by opening an issue and a revert/repair PR through the same reviewed branch path. Do not bypass review with a direct main push.

Cache busting

Source ?v= values are equal placeholders. Deploy replaces them and the source NavAid.version: '1.0' suffix with the short SHA automatically; authors do not manually bump those values per change.