Github Action for `rsconnect::writeManifest`

Hello!

Wondering if anyone has experimented with using Github Actions to automate rsconnect::writeManifest for updating Connect deployments? Is this generally a feasible approach?

Thanks :slight_smile:

1 Like

Whew! Sorry @dwhdai! It has been a while - but this is such a good question, I couldn't resist!

I think a GitHub Action for writing the rsconnect::writeManifest() is probably not feasible because it would require installing all of the packages / etc. in order to generate the manifest! Are you managing packages in a .lock file of some type already for reproducibility? renv.lock or something similar?

What might be a more realistic scenario is a "git hook" for automatically running rsconnect::writeManifest() in your dev environment as a pre-commit or post-commit hook, something like that. Does that seem like it might be feasible in your environment?

Would definitely love to get more info on the workflow you are using today, as well as your ideal workflow! And if you have solved the problem in these past two months, I would love to hear how you did it! :smile:

Thanks for the response @cole!

I am using renv.lock to snapshot package versions. I notice that the manifest.json versions usually match what's in my renv.lock; I wonder if the renv.lock alone is sufficient for generating the manifest.json?

Pre/post-commit Git hook sounds like a feasible approach! I'll definitely look into this.

Awesome!! Unfortunately the manifest.json does use information from the package installation, so you can use the renv.lock to get there by:

  • renv::restore()
  • rsconnect::writeManifest()

But in practice that takes a while :frowning_face: As a result, the git hook might be a better bet, at least for now! I'll share this feedback with our team though! It'd be great to not need two different files to manage an environment :smile:

(Also, if you come up with a git hook, I'm sure others would be interested if you're up for sharing it here!)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.