You can configure a Shinyapps app to run a script that pushes a commit to a Github repo. Just:
- set up a Github access token with minimal permissions, e.g. Settings / Personal access tokens / Generate new token (tick repo permissions)
- deploy script to shinyapps.io, eg.
rsconnect::deployApp(account = 'accountname')
- trigger it with a remote call (eg. crontab) like
curl https://accountname.shinyapps.io/app_name/index.php