-
Notifications
You must be signed in to change notification settings - Fork 1
CI: consolidate workflows, fix Pages deployment, add caching #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The target/ symlink to _build/ wasn't preserved by upload-pages-artifact, causing JS module MIME type errors. Build a _site/ directory with resolved symlinks, both JS and wasm-gc targets, and src/webapi.mjs for wasm imports. Also add [js | wasm] links to the examples index. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Eliminate duplicate runner setups by merging the Pages deployment workflow into CI and folding the examples job into build-test-webapi. Pages steps run conditionally on push to main only. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates CI and Pages deployment for the MoonBit WebAPI repo by consolidating workflows, adding caching, and improving the GitHub Pages artifact layout so the examples site can deploy reliably (including wasm-gc builds).
Changes:
- Consolidates Pages deployment into the main CI workflow and adds caching for npm, MoonBit packages, and Playwright browsers.
- Adjusts Pages site preparation to publish examples plus
src/webapi.mjs, and adds wasm links to the examples index page. - Bumps
moonbitlang/asyncdependency version in the root MoonBit module.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
moon.mod.json |
Bumps moonbitlang/async version. |
examples/index.html |
Updates examples landing page layout and adds per-example target links (js/wasm). |
.github/workflows/pages.yml |
Removes standalone Pages workflow (merged into CI). |
.github/workflows/ci.yml |
Consolidates build/test/examples/pages deploy into one workflow and adds caching + deployment steps. |
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Workflow-level permissions grant pages: write and id-token: write on all events including pull_request. Even though the deploy job is gated, this still broadens the GITHUB_TOKEN for PR jobs; prefer setting minimal default permissions (e.g., contents: read) and granting pages/id-token only on the deploy/upload steps or jobs that need it.
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: false |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
concurrency: group: "pages" is applied at the workflow level, which will serialize all CI runs (including PR checks) behind the Pages deployment queue. If the intent is only to prevent concurrent deployments, move the concurrency block to the deploy job (or make the group conditional on push/main) so PR CI runs can execute in parallel.
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
| run: | | ||
| mkdir -p _site/src | ||
| cp -rL examples _site/examples |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cp -rL examples _site/examples will dereference any symlinks (including the examples/target -> ../target link mentioned in the PR description) and copy the entire linked directory into the Pages artifact. This can significantly bloat the uploaded site if ../target contains build outputs beyond what the examples need; consider copying only the required target/**/build/** subpaths (or ensuring the examples target output is isolated under examples/target) to keep Pages artifacts small and deployments faster.
| cp -rL examples _site/examples | |
| cp -r examples _site/examples |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
targetsymlink (was causing MIME type errors) and add wasm-gc support withsrc/webapi.mjs[js | wasm]links to examples index pagepages.ymlintoci.ymland foldexamplesjob intobuild-test-webapito eliminate duplicate runner setups.mooncakes), and Playwright browsersmoonbitlang/asyncto 0.16.6Test plan
🤖 Generated with Claude Code