Best solution for Postman publishing new collection on push to GitHub repo?

I want to publish a postman collection for my users, but I want this to be published regularly as part of our CI/CD pipeline. When API specs are pushed to the main branch on an internal, private repository, we push those specs to the main branch of a public repository that is read only.

I want to generate a new postman collection from this repository, but the option to connect a collection to a repository seems to assume that it’s the main repository and not a copy that can’t be modified.

What is the best approach here?