Add per-PR demo bundle CI workflow (#50)#51
Merged
Conversation
On every push to any PR (drafts included), build the tiles from a small committed fixture (Emmaboda GK + Nybro golfklubb, 1.5 MB, cut from sweden-latest 2026-07-05) with the repo's Docker image (GHA-cached), then upload a demo bundle artifact: golfTiles.pmtiles + the PR branch's style + a local viewer page that rewrites pmtiles source URLs at runtime, so the PR can be tested in a local browser with one http-server command. Co-authored-by: HuggeK <48095810+HuggeK@users.noreply.github.com>
Explains what the per-PR demo bundle artifact is, what it contains, how to download and serve it locally, the Range-request caveat, and that the committed fixture keeps CI from ever hitting Geofabrik. Co-authored-by: HuggeK <48095810+HuggeK@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #50.
Summary
On every push to any pull request (drafts included), CI now builds the golf tiles from a small committed fixture and uploads a demo bundle artifact you can test in your local browser:
tests/fixtures/golf-fixture.osm.pbf— 1.5 MB extract around Emmaboda GK + Nybro golfklubb (cut 2026-07-05 from sweden-latest via the committedextract-config.json), with a.gitignoreexception so it stays committed..github/workflows/pr-demo-bundle.yml— builds the repo's Docker image with the same GHA build cache asdocker-publish.yml(schema/style PRs never recompile tilemaker), runs the PR's ownrun_all.sh/process.lua/style via bind mount, validates the style JSON and the PMTiles header, then uploadsgolftiles-demo-pr<N>-<sha>(14-day retention). Superseded runs are cancelled per-PR.demo/local-viewer.html— bundled asindex.html; loads the PR's style verbatim and rewrites itspmtiles://source URLs at runtime againstwindow.location, so it works on any localhost port. Opens over Emmaboda GK at zoom 14.demo/BUNDLE_README.txt— one-command instructions (npx http-server -p 8080 .).How reviewers use it
PR page → Checks → PR demo bundle → Artifacts → download, unzip,
npx http-server -p 8080 ., open http://localhost:8080/.Verification (all done locally before this PR)
osmium tags-filter).Caveats
Dockerfile/submodule change) compiles tilemaker (~15–30 min). Subsequent pushes to the same PR are GHA-cache hits and take a few minutes. PR-scoped caches can read caches written onmain, so optionally also building the image onmainpushes would warm the cache for every new PR.contents: read; artifact upload works with the read-only fork token.python -m http.serverwill NOT work for viewing (no HTTP Range support) — the bundle README warns about this.🤖 Generated with Claude Code