Skip to content

Commit ffe2fdb

Browse files
committed
Update tutorial:
- change notes - add other examples - update workflow actions - add notes on how to update actions
1 parent 783527c commit ffe2fdb

File tree

1 file changed

+40
-7
lines changed

1 file changed

+40
-7
lines changed

README.md

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,30 @@
11
# Deploying an R Shinylive App via GitHub Pages through GitHub Actions
22

3-
This repository demonstrates how to deploy an R Shinylive app using GitHub Actions and GitHub Pages.
3+
This repository demonstrates how to deploy an R Shinylive app using GitHub
4+
Actions and GitHub Pages.
45

5-
If you're interested in a Python version, you can find it: [here](https://github.com/coatless-tutorials/convert-py-shiny-app-to-py-shinylive-app).
6+
> [!NOTE]
7+
>
8+
> Please note that this guide is **not** affiliated with Posit, Shiny,
9+
> or Shinylive project. It is a community-driven tutorial to help you get started
10+
> using Shinylive with R Shiny Applications.
611
7-
Or, if you want to learn about creating an R Shinylive dashboard, click [here](https://github.com/coatless-tutorials/r-shinylive-dashboard-app).
12+
### Other Guides
13+
14+
- [Creating an R Shinylive App inside a Quarto Document](https://github.com/coatless-quarto/r-shinylive-demo)
15+
- **Deploying an R Shinylive App via GitHub Pages through GitHub Actions**
16+
- [Data Inclusion in a Shinylive App](https://tutorials.thecoatlessprofessor.com/r-shinylive-data-include/)
17+
- [Deploying an R Shiny Dashboard App through R Shinylive](https://github.com/coatless-dashboard/r-shinylive-dashboard-app)
18+
- [Deploying a Python Shinylive App via GitHub Pages through GitHub Actions](https://github.com/coatless-tutorials/convert-py-shiny-app-to-py-shinylive-app)
19+
20+
### Updates
21+
22+
- **03/26/2025**
23+
- We've fixed the version of the `shinylive` R package to v0.3.0 and
24+
updated the version of GitHub Actions to either v3 or v4 to avoid deprecation
25+
warnings.
26+
- **03/22/2024**
27+
- Initial release of the tutorial.
828

929
## Background
1030

@@ -103,7 +123,7 @@ jobs:
103123
uses: r-lib/actions/setup-r-dependencies@v2
104124
with:
105125
packages:
106-
cran::shinylive
126+
cran::shinylive@0.3.0 ## Pin version to ensure consistency
107127

108128
# Export the current working directory as the shiny app
109129
# using the pinned version of the Shinylive R package
@@ -116,7 +136,7 @@ jobs:
116136
# Make sure to set a retention day to avoid running into a cap
117137
# This artifact shouldn't be required after deployment onto pages was a success.
118138
- name: Upload Pages artifact
119-
uses: actions/upload-pages-artifact@v2
139+
uses: actions/upload-pages-artifact@v3
120140
with:
121141
retention-days: 1
122142

@@ -125,9 +145,22 @@ jobs:
125145
# instead of using `docs/` or the `gh-pages` branch of the repository
126146
- name: Deploy to GitHub Pages
127147
id: deployment
128-
uses: actions/deploy-pages@v2
148+
uses: actions/deploy-pages@v4
129149
```
130150
151+
> [!NOTE]
152+
>
153+
> We have pinned the version of shinylive package on CRAN to v0.3.0 to ensure
154+
> consistency across deployments. If you want to use the latest version, please
155+
> remove the `## Pin version to ensure consistency` line from the
156+
> `Setup R dependency for Shinylive App export` step.
157+
158+
> [!NOTE]
159+
>
160+
> GitHub Actions may require the `actions/upload-pages-artifact@v3` and
161+
> `actions/deploy-pages@v4` actions to be updated to the later versions if
162+
> you encounter GitHub Action runner deprecation warnings.
163+
131164

132165
#### Conversion Assumptions
133166

@@ -151,7 +184,7 @@ The output directory `_site` for the converted Shinylive app is used as it's the
151184

152185
```yaml
153186
- name: Upload Pages artifact
154-
uses: actions/upload-pages-artifact@v2
187+
uses: actions/upload-pages-artifact@v3
155188
with:
156189
retention-days: 1
157190
path: "new-path-here"

0 commit comments

Comments
 (0)