Automatic deploys on private repository

Hello, I deployed my app both on streamlit and heroku. I know that if you made your repository public, every modification will go to the app in a fast way. Is there any trick to get the repository set as private and still made the changes automatic ?

On Streamlit sharing (our free, community tier), each change is shown immediately, because our service is set up that way. Streamlit for Teams (our future enterprise tier) will support private repositories along with all of the other features of Streamlit sharing such as automatic updating.

Not sure where Heroku fits in with this question, but if it’s possible to do automatic deployment, I’m sure it’s in their docs somewhere.