Skip to content

Publish the product site from this repository - #26

Merged
omar-hanafy merged 1 commit into
mainfrom
pages/self-hosted-site
Jul 25, 2026
Merged

Publish the product site from this repository#26
omar-hanafy merged 1 commit into
mainfrom
pages/self-hosted-site

Conversation

@omar-hanafy

Copy link
Copy Markdown
Owner

Moves the product site off omar-hanafy.github.io and onto this repository's own GitHub Pages site.

The site was already built here by tool/build_pages.sh, then pushed into omar-hanafy.github.io/scroll-spy/ by a workflow carrying a cross-repository token. That token, and the copy of the built site living in another repository, both go away.

A project site is served from the repository name, so the public path moves from /scroll-spy/ to /scroll_spy/.

What changed

  • .github/workflows/pages.yml replaces .github/workflows/deploy-pages.yml. It builds, verifies, and uploads a Pages artifact; the deploy job runs only on main. Pull requests build and run every guard but never publish. Action SHAs are pinned.
  • tool/build_pages.sh now targets /scroll_spy/ and stages into build/pages/site. Brand asset regeneration leaves the deploy path - those assets are already committed, so the published bytes are the reviewed bytes, and no image toolchain is installed on every deploy.
  • Every absolute /scroll-spy/ URL in the authored pages is repointed: canonical tags, Open Graph and Twitter images, sitemap.xml, robots.txt, llms.txt, and the demo's own canonical tag in example/web/index.html.

What is not committed

demo/ is a 43 MB Flutter web build. It is produced from example/ at deploy time and merged with website/ into one tree. build/ is gitignored, so it cannot be committed by accident.

Guards

Three failures are checked before anything uploads:

  1. the demo's compiled <base href> is exactly /scroll_spy/demo/ - a wrong base href produces a page that loads and then 404s every asset, which is a blank screen rather than a build failure;
  2. the authored landing page is present in the bundle - the two halves are assembled independently, so the demo alone would otherwise deploy cleanly as a site with no landing page;
  3. no /scroll-spy/ string survives anywhere in the bundle.

All three pass locally against a full --wasm build, and the assembled file set is identical to what is currently deployed.

Follow-up

README and pubspec.yaml links still point at the old URL. They move in a second PR, once the new URL is verified live.

The site was built here and then pushed into omar-hanafy.github.io/scroll-spy/
by a workflow holding a cross-repository token. Publish it as this repository's
own GitHub Pages site instead, so the source, the build, and the deployment all
live in one place and no write credential for another repository is needed.

A project site is served from the repository name, so the public path moves from
/scroll-spy/ to /scroll_spy/. Update every absolute URL in the authored pages -
canonical tags, Open Graph and Twitter images, the sitemap, robots.txt, llms.txt
and the demo's own canonical tag - and compile the demo with a matching base
href.

The bundle stays two halves: website/ is committed source, and demo/ is the
Flutter build of example/, assembled at deploy time and never committed.
tool/build_pages.sh produces that bundle identically for a local preview and for
CI. Brand asset regeneration leaves the deploy path; those assets are already
committed, so the published bytes are now the reviewed bytes.

Pull requests build and run the guards but do not deploy.
@omar-hanafy
omar-hanafy merged commit 658f321 into main Jul 25, 2026
7 checks passed
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