Setup staging instance with GitLab CI

We’re using this template https://gitlab.coko.foundation/editoria/vanilla-edk for development of editoria-vanilla and editoria components from monorepo, and it works well locally.

However we also would like to have staging server which will be updated after commits to both repos. It is clear how to link main repo (editoria-vanilla) to Gitlab CI, the question is how to hook monorepo with component to same instance?

Should we setup private npm server and use lerna to push editoria components to it?

Hello @yojeek!
The EDK of Editoria is just for local development as you said already. If you want to have a staging server you could create a staging branch in your editoria-vanilla as well as one for the monorepo and in your app’s (editoria-vanilla) package.json you could target the staging branch of the monorepo for each component used (e.g. https://medium.com/@jonchurch/use-github-branch-as-dependency-in-package-json-5eb609c81f1a).
We haven’t used this approach so far but theoretically this could do the trick. Also, in your CI I guess you could configure the appropriate triggers for the redeployments but I am not so familiar with that. Maybe @kominoshja could have a better insight

I also haven’t experimented with such deployment, but i think @alexgeorg’s method should work