Skip to content

ci: add WASM build and GitHub Pages deployment#71

Open
Velli20 wants to merge 1 commit intomainfrom
ci-wasm
Open

ci: add WASM build and GitHub Pages deployment#71
Velli20 wants to merge 1 commit intomainfrom
ci-wasm

Conversation

@Velli20
Copy link
Owner

@Velli20 Velli20 commented Feb 5, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 5, 2026 18:19
Copy link

Copilot AI left a 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 adds WebAssembly build support using Emscripten and automatic deployment to GitHub Pages. The changes enable building the project as WASM and deploying a demo to GitHub Pages on every push to the main branch.

Changes:

  • Added GitHub Pages deployment workflow with WASM build job
  • Configured workflow permissions and concurrency control for Pages deployment
  • Set up Emscripten SDK installation and WASM artifact preparation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 17 to 19
concurrency:
group: "pages"
cancel-in-progress: false
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The concurrency configuration is applied at the workflow level, which means it affects all jobs including test and build-wasm jobs on all branches and PRs. This will cause PRs to be blocked if another PR or a push to main is running, even though only the deployment should be serialized. Consider moving this concurrency configuration to only the deploy job where it's actually needed, or use a group name that includes the github.ref context to separate different branches/PRs.

Copilot uses AI. Check for mistakes.
Comment on lines 12 to 13
pages: write
id-token: write
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pages and id-token permissions are granted at the workflow level, which means all jobs (test, minimal, build-wasm, deploy) will receive these elevated permissions. According to the principle of least privilege, only the deploy job needs these permissions. Consider either using a separate workflow for deployment or moving these permissions to the deploy job level using a permissions block within that job.

Copilot uses AI. Check for mistakes.
cp examples/web/dist/emscripten.js deploy/
cp examples/web/dist/emscripten.wasm deploy/

- name: Upload Pages artifact
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The upload-pages-artifact step runs on all workflow triggers (including PRs), but the deployment only happens on pushes to main. This means artifacts are created and uploaded for PRs even though they are never deployed. Consider adding a conditional to the upload step (if: github.event_name == 'push' && github.ref == 'refs/heads/main') to avoid creating unnecessary artifacts, or split the build-wasm job into separate build and upload steps with different conditions.

Suggested change
- name: Upload Pages artifact
- name: Upload Pages artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

Copilot uses AI. Check for mistakes.
@Velli20 Velli20 force-pushed the ci-wasm branch 19 times, most recently from 2e23eac to 3590965 Compare February 5, 2026 21:04
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