How to disable CI/CD for external repository?

I followed the steps " GitLab CI/CD for external repositories" here to set up CI/CD for a repository hosted on github.com. Now I’d like to stop CI/CD pipelines from running, but I don’t want to delete the project as I don’t want to lose the history of pipelines and jobs previously run.

How can I turn off CI/CD of the external repository for this project?

I turned off the GitHub integration of the project, but that had no effect. I now realise the GitHub integration has a different purpose (sending statuses from GitLab back to GitHub) and will not stop the CI/CD pipelines.

I also removed the webhook from the GitHub side, which seems to have prevented GitLab building PRs, but has not stopped it building pushes to the master branch.

Thanks!

Found something that worked - under Settings → Repository → Mirroring Repositories, delete the mirror of the github.com repo. This prevents updating from the external repo as well as running CI/CD, but that is good enough for me.