Rstudio connect change publish source code to document only

Ooh no!! That is unfortunate :frowning_face: What is the link that you shared? Was it the direct content link? (with a weird hash or numbers?)

Unfortunately it is not possible to change a deployment type on Connect (from static to source, source to static, etc.). Further, the "content links" are not editable, so any new content item will have a different link (even if you delete this content, etc.)

A couple of options:

  • turn your old report into a "redirect." This is a little tricky, but is discussed here:

And also here (although in this case, there is also a proxy involved):

  • The easiest way to do this is (going forward) to share vanity URLs with users. This is the custom URL that administrators (by default) and (if configured) publishers can define for a piece of content.

https://docs.rstudio.com/connect/user/content-settings/#custom-url

If you use vanity URLs, you can "swap" URLs between two pieces of content and thereby allow "blue-green" type deployments or "changing the content type" from a user's point of view. There is a swap_vanity_url() function in the connectapi package, and you can also do so manually in the UI.