Trouble with deployApp of a Rmd with runtime:shiny_prerendered

For work, I have a shinyApp where users can input responses, which are saved in a google sheet.

Additionally, I have a R Markdown with the following YAML:

output: 
  learnr::tutorial:
    progressive: true
    allow_skip: true
runtime: shiny_prerendered

This R Markdown uses the googlesheets package to load in the responses that users inputted on the Shiny App and creates a document. As you can see, this R Markdown is interactive; its content changes depending on users input on the shinyApp.

What I want is the following:

On my shinyapp, using actionButton, I want to deploy the RMarkdown online, essentially pressing Run Document button on the R Markdown. The result would be hosting this RMarkdown online, maybe on shinyapps.io

What I've tried:

I've deployed both the shinyApp and R Markdown on shinyapps.io and tried deploying the RMarkdown by including the actionButton on my shinyApp and pressing the button. Unfortunately, the shinyApp shows me an error message:

"Disconnected from the Server"
Reload

Look in your application's logs.

I looked and the log shows me:

Warning: Error in : You must register an account using setAccountInfo prior to proceeding.

86: deploymentTarget
12: fn
88: stop
stopWithNoAccount
85: rsconnect::deployApp
84: observeEventHandler [/srv/connect/apps/learnr_upwork/app.R#604]
13: runApp
7: connect$retry
6: eval
5: eval

If you are trying to create an application whose function is to deploy something, you must include the credentials with which to perform the deploy.

So, are you saying that in deployApp,

I should specify the parameters account and server ?

It is uncommon for folks to create applications that in turn deploy applications. And we do not document it.

However, yes, if you want your application to deploy another application, you must include the credentials, just as you need them when deploying from the RStudio IDE itself. See the documentation for the rsconnect package for details.

Hey Josh,

I'm not exactly sure what composes of credentials, but I'll try specifying the parameters account and server first, which I assume I need for deploying from the RStudio IDE.