Step by step

My repository structure looks like this

/my-app

.gitlab-ci.yml /frontend

.gitlab-ci.yml /api

.gitlab-ci.yml

Where “my-app” is the root folder, the “frontend” folder is a generated Vue.js app with Vue CLI and the “api” folder is a generated AdonisJS (Node.js) app with AdonisJS CLI. I’m going to show you the code in all the required files below.

This was my first time trying a monorepo approach and writing CI/CD files, so let me alert you: The way the configs are written may not be the best practice. I went step by step trying to get everything to work, collecting from various resources.

Before I walk you through my .gitlab-ci.yml configs, I’d like to mention all the sources that led me to where I am:

Reading those might be a good starting point for those of you who have no idea what they’re doing (much like myself 😁). We all have to start somewhere, right?