If you want to use GitLab as a source of code for Apify actor, you need to be at least in the role Maintainer and then this is what you need to do.
- Create a project on GitLab
- Push the code to the repo, if you want to have more actors in one repo, which makes sense for one customer for example, then just upload one actor to one folder.
- When we have the project o GitLab and code here, go to the Apify to the actor where you want to load the code to and change the source to Git repository :
Go to the GitLab project to the settings -> CI/CD -> Deploy Keys and add there the copied public SSH key
Go to the actor again and past there the url, but you need to modify this way (always use the #master)
So the example for the Asos actor will be:
And you can click build.
Tip: You can have your actors built automatically when an event is fired (e.g. push to repo) by setting up a webhook at GitLab. Copy the build URL from actor's API tab into Repository/Webhooks