Mirror GitLab repository to GitHub at end of CI pipeline?

I’d like to mirror my repository to GitHub only after my pipeline has completed. I envision this as just being another stage, but I can’t figure out the best way to do this.

I’ve seen that Repository Mirroring is available, but the documentation reads like this happens with every push. That is not my goal. I only want to mirror to GitHub when the pipeline succeeds.

How can I do this?