How to do an implementation of an Angular application in Heroku using Gitlab?

0

Angular Usage 5 (5.2.10) and Angular CLI (1.7.4) and I would like to do Deploy on Heroku, however my files are in the Gitlab repository. More information: node (8.11.1) and npm (5.6.0).

    
asked by anonymous 20.04.2018 / 15:38

1 answer

0

Heroku supports deploy with Git natively, just add a new > remote to the repository for Heroku and push push to that remote .

I tried to something similar with my Azure Web App - a SPA in Angular - and the hindrance I found is not being able to push right from the Angular project repository because Angular is transpiled to JavaScript in the build act >. As such you have two options:

  • Create a new repository in the output folder of the transpilation (usually ../dir_do_projeto/dist ) with Heroku as remote - which is easy to give problems because of having a repository within another repository;
  • Create a new local repository in your development environment with Heroku as remote where you manually copy the files from dist whenever you want to deploy . li>

    I would personally opt for the 2nd option since I encountered problems with the previous one. Either way I have enough colleagues who prefer the 1st option for simplicity and do not need their manual interaction.

    Useful resources:

  • 20.04.2018 / 15:50