How to add a custom post deployment script to azure websites?

前端 未结 2 377
悲哀的现实
悲哀的现实 2020-12-08 23:18

My problem is that I need to run a custom cmd file after the build. Instead of modifying the deployment scripts I just want to run few MSDOS commands to my deployment easily

相关标签:
2条回答
  • 2020-12-08 23:21

    At the azure portal on the CONFIGURE tab of your website add a "app settings" entry called POST_DEPLOYMENT_ACTION with the value of source/copyextrafiles.cmd Save and the next deploy will run the cmd for you after the deploy.

    Here the picture: enter image description here

    0 讨论(0)
  • 2020-12-08 23:37

    An alternative in addition to the solutions already provided is to copy the script in to a specific folder provided for post deployment action hooks.

    So after creating a new directory in "D:\home\site\deployments\tools\" named "PostDeploymentActions", you could just add script files (.bat, .cmd or .ps1) into the directory and they will all run, one by one, after each deployment.

    0 讨论(0)
提交回复
热议问题