We can imagine different approaches but the best is to define a production branch and have the Jenkins job call _scripts/publish-to-github.sh when the production branch is pushed.