In my project I use merge requests to test builds, and deploy once the commit is merged to master. Currently my .gitlab-ci.yml looks like:
.gitlab-ci.yml