I've set up a deployment project for an Angular app, copying its files to a remote server (with SCP task) and building it with `ng serve` (with command over SSH task). Now, even though this works, and the app is successfully deployed, there are problems with this.
FIrst, the deployments are kept running for a long time, because the `ng serve` command doesn't provide a return code until it's canceled manually. Second, those deployments are always marked as failed, even though the app works - but that makes sense, because third, after executing those commands, there is no control over the deployment. If there's an error, I have to manually go to the server and kill the process, before trying again.
I have searched for solutions, but couldn't find any. Is there a better way of doing this?