Skip to content

Build and deploy the website with GitHub Actions - #122

Merged
ctessum merged 1 commit into
masterfrom
website-github-actions
Sep 9, 2026
Merged

Build and deploy the website with GitHub Actions#122
ctessum merged 1 commit into
masterfrom
website-github-actions

Conversation

@ctessum

@ctessum ctessum commented Sep 9, 2026

Copy link
Copy Markdown
Member

The website was previously built by hand and the result checked in, along with the website's node_modules directory and the automatically generated command-line documentation. This adds a website workflow that generates the command documentation, builds the website, and deploys it to GitHub Pages on every push to master, and stops tracking the generated files.

What changed

Change Detail
.github/workflows/website.yml go generate .npm cinpx docusaurus-buildupload-pages-artifactdeploy-pages. Deploys on pushes to master; pull requests and other branches build only, as a check.
.gitignore Stops tracking website/build/, website/node_modules/, docs/cmd/ and docs/output_options.md — 17,729 files.
website/static/CNAME Contains inmap.run, so the deployed artifact carries the custom domain.
internal/autogen.go Two fixes needed to generate the documentation from a fresh checkout; see below.
website/Makefile, website/README.md Plain-npm local development (make host, make build, make clean) replacing the Docker and yarn flow.
README.md, RELEASE.md Links to the generated documentation point at the website, since it is no longer in the repository; the release checklist notes that the deploy is automatic.

Fixes to internal/autogen.go

Generating the documentation from a fresh checkout did not work before:

  • docs/cmd is now created if it does not exist, and the error from doc.GenMarkdownTree is checked. Previously a missing directory made the call fail silently and then panic in filepath.Walk.
  • writeOutputOptions builds the variable-resolution grid in a temporary directory instead of reading the checked-in cmd/inmap/testdata/inmapVarGrid.gob. That file was written by InMAP 1.6.1 and the current code requires 1.10.0, so generation failed outright with InMAP variable grid data version 1.6.1 is not compatible with the required version 1.10.0.

As a result the regenerated command documentation differs slightly from the copies that were checked in, which were missing inmap sr start --version and carried a stale --EmissionMaskGeoJSON description.

Verification

A fresh clone of this branch runs go generate ., npm ci and npx docusaurus-build successfully and produces a site with the same 113 files as the build that was previously checked in, plus the new CNAME.

Before this can serve inmap.run

Two steps are needed outside this repository, in this order:

  1. Move /eieio and the cloud API off the apex domain. inmap.run:443 is the default gRPC endpoint (inmaputil/cmd.go:1066) and https://inmap.run/eieio is linked from the site header. GitHub Pages serves static files only, so repointing inmap.run at it breaks both. They need another hostname, along with a matching header link in siteConfig.js and a new client default.
  2. Then switch the domain over: set Settings → Pages → Source to "GitHub Actions", set the custom domain to inmap.run, and change DNS from 35.232.224.150 to GitHub's Pages A records.

Until step 2, the workflow still runs and deploys to spatialmodel.github.io/inmap, where assets will 404 because baseUrl is /. That resolves itself once the custom domain is live.

Optional cleanup: the gh-pages and gh-pages-bak branches hold an unrelated 2016 APEEP site. Actions-based Pages ignores them.

🤖 Generated with Claude Code

The website was previously built by hand and the result checked in, along
with the website's node_modules directory and the automatically generated
command-line documentation. Add a `website` workflow that generates the
command documentation, builds the website, and deploys it to GitHub Pages
on every push to master, and stop tracking the generated files.

Two fixes to internal/autogen.go were needed to make the generated
documentation reproducible from a fresh checkout:

- Create docs/cmd if it does not exist, and report errors from
  doc.GenMarkdownTree instead of silently walking a missing directory.
- Build the variable-resolution grid used to list the model output options
  in a temporary directory rather than reading the checked-in
  cmd/inmap/testdata/inmapVarGrid.gob, which was written by an older,
  incompatible version of InMAP.

Because the command documentation is no longer in the repository, the
README links to it on the website instead of by relative path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ctessum
ctessum merged commit 06a03d0 into master Sep 9, 2026
2 of 8 checks passed
@ctessum
ctessum deleted the website-github-actions branch September 9, 2026 15:03
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