Add GitHub Pages deploy for DDS Web - #306
Merged
Merged
Conversation
Pages cannot set COOP/COEP; vendor coi-serviceworker and a staging/deploy workflow so SharedArrayBuffer solves work on the published site. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a GitHub Pages deployment path for DDS Web (WASM) so the static site can run pthread solves on Pages by vendoring and loading coi-serviceworker.js to provide COOP/COEP via a service worker, plus a small staging script and tests/docs to support publishing.
Changes:
- Add a GitHub Actions workflow to build DDS Web WASM on pushes to
developand deploy a staged_sitedirectory to GitHub Pages. - Vendor
web/coi-serviceworker.jsand ensuredds_web.htmlloads it early (in<head>) for SharedArrayBuffer support on hosts without custom headers. - Add
web/stage_github_pages.pyand unit tests to stage a publishable directory (includingindex.htmlas a copy ofdds_web.html), and document the workflow/usage.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
web/tests/web_site.py |
Includes coi-serviceworker.js in staged static assets used by web tests. |
web/tests/test_web_html.py |
Adds checks that dds_web.html wires coi-serviceworker.js correctly and that the vendored script contains COI header strings. |
web/tests/test_stage_github_pages.py |
Adds unit tests for the new GitHub Pages staging script. |
web/stage_github_pages.py |
New staging utility to assemble a Pages-ready directory including index.html. |
web/dds_web.html |
Loads coi-serviceworker.js from <head> and documents why it’s needed on Pages. |
web/coi-serviceworker.js |
Vendored COOP/COEP service worker helper used to enable cross-origin isolation on Pages. |
web/BUILD.bazel |
Wires the new/updated py_tests and includes coi-serviceworker.js in relevant test data and suites. |
specs/web.md |
Updates web spec notes to mention Pages deployment and staging script. |
docs/wasm_build.md |
Documents GitHub Pages constraints, the service worker approach, and the deploy workflow. |
.github/workflows/deploy_pages.yml |
New workflow to build WASM, stage _site, upload as Pages artifact, and deploy. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
develop.coi-serviceworker.jsand load it fromdds_web.htmlso SharedArrayBuffer / pthread solves work on Pages (which cannot set COOP/COEP headers).web/stage_github_pages.pyplus tests/docs for staging the static site (index.html+ assets).Test plan
bazelisk test //web:dds_web_html_test //web:stage_github_pages_test //web:wasm_scripts_testhttps://<owner>.github.io/<repo>/loads and a solve succeeds after the first-visit COI reloadpython3 web/serve_web.pystill isolates without needing the service workerMade with Cursor