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
Copy file name to clipboardExpand all lines: README.md
+126-2Lines changed: 126 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,131 @@ This repository demonstrates how to deploy an R Shinylive app using GitHub Actio
4
4
5
5
The initial app source code is from a [StackOverflow Question](https://stackoverflow.com/questions/78160039/using-shinylive-to-allow-deployment-of-r-shiny-apps-from-a-static-webserver-yiel) by [Dasha Semochkina](https://stackoverflow.com/users/23593955/dasha-semochkina).
6
6
7
-
## Setup
8
7
9
-
...
8
+
## Shinylive App Size
10
9
10
+
Shinylive apps require around 60 MB or more data due to their dependency on the initial webR base and all {shiny} package dependencies. When moving away from a compute server running Shiny Server to a generic web server, the trade-off lies in the amount of user bandwidth required. So, the users internet and computer is paying for the ability to view the app compared to the old status quo where the host paid a license fee (to Posit), server and maintenance costs.
11
+
12
+
You can inspect the current list of package dependencies for a basic Shiny app using the following R code:
Adding more R packages through in-app dependencies will expand this list and increase the download size of each app.
36
+
37
+
38
+
## Deploying Automatically with GitHub Actions
39
+
40
+
Please **avoid** using the [`gh-pages` branch deployment technique](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-from-a-branch) for sharing the app on GitHub pages.
41
+
42
+
Instead, opt for the [GitHub Actions approach](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow), which is preferred because it doesn't store artifacts from converting a Shiny App into a Shinylive App inside the repository. Plus, this approach allows for Shinylive apps to be deployed up to the [GitHub Pages maximum of about 1 GB](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#usage-limits).
43
+
44
+
Specifically, we're advocating for a file structure of:
45
+
46
+
```sh
47
+
.
48
+
├── .github
49
+
│ └── workflows
50
+
│ └── build-and-deploy-shinylive-r-app.yml
51
+
├── README.md
52
+
└── app.R
53
+
```
54
+
55
+
Thus, we could place the example app source code into `app.R` and, then, use the following GitHub Action in `.github/workflows/build-and-deploy-shinylive-r-app.yml` to build and deploy the shinylive app every time the repository is updated:
0 commit comments