This was a fun 🤓 experiment to build the intuition of using Github Actions (GHA) to automate “things”. In this case, I use GHA to auto-deploy a shiny app to my personal shinyapps.io account.
In a nutshell, it works like this:
- Everytime a push is made to the master branch of this repo, a github action script is triggered 🏃🏃🏻🏃🏼 💨
- The set of GHAs is specified using a
yaml
file, here~/.github/workflows/deploy.yaml
- In the yaml file, you provide explicit instructions to build your app from the ground up. This includes everything from first installing R, R packages to deployment to shinyapps.io via the
{rsconnect}
package.🔀🔁 - One the GHAs are finished, the app is made available at the destination. ✅
Pretty neat!
In order to test whether GHA was working, the sample app I created is a super-simple dashboard 📈📉📊 that takes a single reactive: the date and time of deployment ⏰. There are other, more informative ways to monitor their progress and I will be covering this and more in depth in my Quarto use-case write up 💬. Stay tuned!
For now, I want to make this available as it reflects a recent learning and a pattern I can see myself reusing in the future. Many thanks to the following people + resources 💪💪💪
Till next time, 🍻!