Xcode Provisioning Profile issue on GitLab CI Build machine

We have a team of developers that work independtly on separate apps using XCode, locally we can build etc and any issues with provisioning profile Xcode automatically sorts out.

We use GitLab as our main repository and have set up a runner on a Mac mini to handle our distribution builds. Now generally this works fine, until we change our provisining profile (mainly by adding in app purchasing or push notifications). When this happens our local laptops auto syncs with apple and update the profile locally. When we come to build on Mac mini, it fails due to profile not containing relevant info. If we go to the Mac mini, load Xcode, build our projects, its fine after that but this step is causing problems, mainly as most engineers aren’t office based, so have to make a special trip in to sort the Mac mini.

Is there a solution to this? How do others handle it?

IS there a command line option to force Xcode to update profiles before we build, which we could add to the CI script. Is there a way of embedding the profile into projects?