'Shiny Apps, ioslides (or just Rmarkdown), and Github

I have an ioslides/rmarkdown file with an embedded Shiny app. I was hoping to put this presentation on my github account but when I do the app stops running. I have tried a few different ways to embed the app. Currently I am doing something like the following.

---
title: "My Title"
output: 
  ioslides_presentation:
  css: style.css
runtime: shiny
knit: (function(input_file, encoding) {
    out_dir <- 'docs';
    rmarkdown::render(input_file,
      encoding=encoding,
      output_file=file.path(dirname(input_file), out_dir, 'index.html'))})
---

## Slide with app on it

``{r, echo = FALSE, message=F, warning=FALSE}
shinyAppFile(
  "ShinyApps/FileWithMyAppInIt/app.R",
  options = list(width = "100%", height = 700)
)
``

## Another slide 
Text here 

The knit in option in my YAML is to be sure the file compiles in a /docs folder so I can publish the presentation. Help appreciated! I also tried just including the link to my shiny app using something like this (https://datasciencegenie.com/how-to-embed-a-shiny-app-on-website/), but that is producing the same problem, a blank app.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source