-
Notifications
You must be signed in to change notification settings - Fork 7
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
The {rwasm}/actions documentation needs to be improved #21
Comments
My comment above is a little strong, the The issue is more that the documention does not make it clear enough what the difference is between the "build and attach a Wasm binary to your package releases", and the "create a CRAN-like Wasm binary repository" workflows, and why you might want to use one or the other. For example, the first works well for attaching the action onto an existing R package repo, because it does not interfere with building a pkgdown website on Github Pages. This action also makes it possible to export your package easily with On the other hand, the second requires a separate git repository and listing your package(s) to include in the CRAN-like repo, otherwise it will interfere with pkgdown unless using https://github.com/r-wasm/actions/blob/main/examples/rwasm-binary-and-pkgdown-site.yml. The benefit is that you get a CRAN-like repo you can include in any webR application. We also need to mention r-universe somewhere, because the workflow there is extremely beneficial for non-expert users. I guess what I am saying is "there are options here, and the right one to pick is complicated". The docs need some working on to reflect that. |
In both actions, when adding packages, the phrase |
I admit I've struggled with the documentation as well! I have an r package on github that is a dependency of a shiny app that I'm trying to convert to a shinylive app. On running > shinylive::export("R", "site") in the app repo, it errored out because that package didn't have the WASM binary assets associated with the release. That pointed me to this r-wasm/actions repo, where I learned from the workflows README to run :
On making a release, the action triggered but errored out with:
Which makes me think that the image doesn't have R. Is the user supposed to tinker with the image used in this workflow? Thanks for your help! Note: I also posted this to the posit community forum. |
Hi @andrewpbray, How strange! I just triggered a test release on the repo and the action ran OK for me! I cannot see why they should behave differently. EDIT: Oh wait, yours is running under ubuntu-24.04! Mine is running under ubuntu-22.04. Curious, we specify
Oh... I see: actions/runner-images#10636. From that announcement:
That explains the difference in behaviour. Probably we just need to install R when running under Okay, so for now I'm going to hard-code our actions to use Could you try updating your workflow file to read the following and releasing again? I've also added the key
|
Hey, good catch! I've updated my workflow file with the one that you provided here and it worked just swell. https://github.com/gradebook-dev/gradebook/actions/runs/11239419246/job/31246421132 This is a really clever workflow, the way it appends the needed assets to the release. Very excited to see if I can get the whole app deployed via shinylive. Thanks for your help! |
The instructions at https://r-wasm.github.io/rwasm/articles/github-actions.html#using-an-r-package-library-image are incorrect. The instructions should instead describe how to use
rwasm-binary-and-pkgdown-site.yml
.This should be made as part of a wider refresh of the
{rwasm}
documentation.The text was updated successfully, but these errors were encountered: