I want to run a CI/CD pipeline on Azure to build and release a nodejs webapp on a self-hosted machine. I have successfully set up a pipeline to checkout the code, build it and publish the artifacts. Now I want to have a release pipeline that downloads the artifacts created in the build pipeline, deploy it to a deployment group and start the app with npm start.
I can manage all the steps except the last one. I have tried adding a custom "npm start" task to the Deployment group job. Azure pipeline gets to that step and then hangs. I guess it just waits for the command to finish, which will not happen, since this is starting the server.
Any idea how to do this?