tommueller
tommueller

Reputation: 2496

Setup CI for Angular library with Gitlab

I have an Angular library using the angular-librarian. Now whenever I change something, I need to rebuild the project and push the content (including the dist-folder) to our repository.

I would like to setup a CI for this to run automated. We have several CIs running, but for this the output of the build-process needs to be pushed back into the repository, which would lead to an infinite loop of builds and also another unnecessary push to the repository.

Is there any way to handle this with gitlabs-ci or is building it and pushing the build from my local machine the best option?

Upvotes: 1

Views: 644

Answers (2)

tommueller
tommueller

Reputation: 2496

For us the solution was to change the workflow to building the app in the ci and publishing it to a local npm-repo instead of keeping the compiled output within the repo.

Upvotes: 1

Stefan van Gastel
Stefan van Gastel

Reputation: 4478

You can use [skip ci] or [ci skip] in your commit message to prevent the loop you mention.

Have a look at the Gitlab CI docs.

Upvotes: 0

Related Questions