GitHub template repository for packaging a Shiny app with
lucent-pack and deploying it
to GitHub Pages.
- Install
lucent-pack
micromamba install lucent-pack
# OR
pip install lucent-pack- Replace
app/with any Shiny app (keep anapp.Ror Shiny directory layout). - Edit
environment.yamlto include every R package the app needs. - Create the WebAssembly environment.
micromamba create -f environment.yaml --platform=emscripten-wasm32- Pack the app and its environment
lucent build \
--prefix-dir /path/to/wasm/environment \
--app ./app --outdir /path/to/output/dir/ \
--title "My Shiny App" # (optional)- (Optional) Serve with lucent
lucent serve /path/to/output/dirOpen the URL printed by lucent serve (default http://127.0.0.1:8000/).
- Use this repository as a template (“Use this template”) or fork it.
- In the new repo: Settings → Pages → Build and deployment → Source: GitHub Actions.
- Update
environment.yamlandapp/as needed. - Push to
main. The pages workflow will:- create the wasm prefix from
environment.yaml - install
lucent-packand build the site - deploy the site to GitHub Pages
- create the wasm prefix from