How to run npm command on azure app service after deployment success by VSTS?

后端 未结 5 1414
臣服心动
臣服心动 2021-01-18 12:02

Now I can deploy from VSTS to azure, but I can\'t run npm after deploy is successful.

Now it is work like -> run npm install for branch files => zip => copy to azure

5条回答
  •  爱一瞬间的悲伤
    2021-01-18 12:51

    The Azure App Service Deployment task in VSTS now supports a post-deployment script. Here is a screen-shot from version 3.* of the task:

    See Task Parameters for more details.

    Windows App Services users: Watch out for an npm bug that prevents multiple npm commands from being run (inline or in a script). For example:

    npm install
    npm test
    

    Will only run npm install. There are several workarounds including this:

    npm install & npm test
    

提交回复
热议问题