简体   繁体   English

使用GitHub作为源代码管理时如何部署Azure网站?

[英]How do I deploy an Azure Website while using GitHub as source control?

I want to create a website and use GitHub for source control. 我想创建一个网站,并使用Gi​​tHub进行源代码控制。 How can I have Azure websites point to my GitHub account and pull the code from there? 如何让Azure网站指向我的GitHub帐户并从中获取代码?

Azure App Service supports continuous deployment to Web Apps from source code control and repository tools like BitBucket, CodePlex, Dropbox, Git, GitHub, Mercurial, and TFS. Azure App Service支持从源代码控制和存储库工具(如BitBucket,CodePlex,Dropbox,Git,GitHub,Mercurial和TFS)向Web Apps进行连续部署。 You can use these tools to maintain the content and code for your application, and then quickly and easily push changes to your Azure web app when you want. 您可以使用这些工具来维护应用程序的内容和代码,然后在需要时快速轻松地将更改推送到Azure Web应用程序。

There are a several steps to make this happen: 有几个步骤可以实现此目的:

  1. Create an empty website on Azure . 在Azure上创建一个空网站 在此处输入图片说明
  2. Push your web code from your local Git repository to one on GitHub. 将您的Web代码从本地Git存储库推送到GitHub上的一个。
  3. From with in the Azure portal, click on your newly created website, followed by Deployments -> Set up continuous deployment . 从Azure门户中的,单击您新创建的网站,然后单击部署 -> 设置连续部署 在此处输入图片说明
  4. At the next screen, you'll be prompted to select your source. 在下一个屏幕上,系统将提示您选择源。 Select GitHub . 选择GitHub 在此处输入图片说明
  5. You'll be prompted to enter your credentials. 系统将提示您输入凭据。
  6. Select the repository you'd like to monitor, and if possible, the branch . 选择您要监视的存储库,如果可能,选择分支 在此处输入图片说明

In a few moments Azure will pull the code from your GitHub repository, and you'll be good to go! 稍后,Azure将从您的GitHub存储库中提取代码,您将一路顺风!

You are not limited to GitHub, though. 但是,您不仅限于GitHub。 You can also deploy from BitBucket, CodePlex, Dropbox, GitHub, or Mercurial results in a continuous deployment process where Azure will pull in the most recent updates from your project, nearly instantly. 您还可以从BitBucket,CodePlex,Dropbox,GitHub或Mercurial进行部署,从而实现连续的部署过程,其中Azure将几乎立即从项目中提取最新更新。

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

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