Gitlab, like many source control tools, has a way of doing continuous integration. An overview is here and a start guide is here.
There is quite a lot of variance and depth to this, so we will not cover it in any detail besides high level
A simple example can be found here.