简体   繁体   English

Azure网站node.js触发部署

[英]Azure website node.js trigger deployment

I have a node.js project running on an azure website. 我有一个运行在azure网站上的node.js项目。 Usually I deploy changes with git (eg git push azure master). 通常,我使用git部署更改(例如git push azure master)。 Today I added a new branch 'newbranch' and committed some changes. 今天,我添加了一个新分支“ newbranch”并进行了一些更改。 Afterwards I pushed the changes to the azure website (git push azure dev). 之后,我将更改推送到了Azure网站(git push azure dev)。

Now I wanted to change the deployment from branch 'master'to branch 'newbranch'. 现在,我想将部署从分支“ master”更改为分支“ newbranch”。 Therefore, I went to the configure tab of my azure website and changed the field 'branch to deploy' to 'newbranch' and hit the save button. 因此,我转到我的azure网站的“配置”选项卡,并将“分支部署到”字段更改为“ newbranch”,然后单击“保存”按钮。

But unlike to http://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/ Section "Specifying the branch to use" azure does not start to deploy. 但是与http://azure.microsoft.com/zh-cn/documentation/articles/web-sites-publish-source-control/部分“指定分支使用”不同,azure不会开始部署。

My current workaround is to change a file and do another push. 我当前的解决方法是更改​​文件并再次进行推送。 Then the deployment process starts. 然后,部署过程开始。

My question: Is there a better way to 'manually' trigger the deployment process? 我的问题:是否有更好的方法来“手动”触发部署过程?

Thanks 谢谢

What it says at that URL is: "Azure should immediately begin updating based on changes to the new branch." 该URL的含义是:“ Azure应该根据对新分支的更改立即开始更新。” It's confusing, but what it means is that next time you push to the newly configured branch, it will deploy from that branch. 这很令人困惑,但是这意味着下次您推送到新配置的分支时,它将从该分支进行部署。 Website deployments are triggered by a webhook at the remote git repository. 网站部署由远程git存储库中的webhook触发。 That means you need to make some change to the newly configured branch, which will in turn invoke the webhook against your website causing it to pull changes and deploy. 这意味着您需要对新配置的分支进行一些更改,这将反过来针对您的网站调用Webhook,从而导致它进行更改并进行部署。

Making a push to your repo is the surest, easiest way to trigger the deployment. 推送回购是触发部署的最可靠,最简单的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM