You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add GitHub Actions workflow for deploying to GitHub Pages and update project for WebAssembly.
* **GitHub Actions Workflow**
- Create `.github/workflows/deploy-gh-pages.yml` to deploy static content to GitHub Pages on push to `main` branch.
- Add steps to check out the repository, set up Rust, build the project, install `wasm-bindgen-cli`, generate `wasm-bindgen` output, copy `index.html` to deploy directory, set up Pages, upload artifact, and deploy to GitHub Pages.
* **Project Configuration**
- Modify `Cargo.toml` to add dependencies for `wasm-bindgen` and `wasm-server-runner`.
* **Main Function**
- Modify `src/main.rs` to add `wasm_bindgen::prelude::*` to imports.
- Add `#[wasm_bindgen(start)]` attribute to the `main` function.
* **Index Page**
- Add `index.html` to load the WebAssembly module and generated JavaScript glue code.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/cabrownlie/random-shader-window?shareId=XXXX-XXXX-XXXX-XXXX).
0 commit comments