Set up continuous deployment

If your code is checked into GitHub or Azure DevOps (formerly Visual Studio Team Services), use continous deployment to automatically deploy code changes from your source repository to Azure. In this topic, we'll cover setting up continuous deployment for GitHub and Azure DevOps.

Note

The scenario covered in this article assumes that you have deployed your bot to Azure, and now you want to enable continous deployment for that bot. Also, know that after continuous deployment is set up, the online code editor in the Azure portal becomes read-only.

Continuous deployment using GitHub

To set up continuous deployment using GitHub repository that contains the source code you want to deploy to Azure, do the following:

  1. In the Azure portal, go to your bot's All App service settings blade and click Deployment options (Classic).

  2. Click Choose Source and select GitHub.

    Choose GitHub

  3. Click Authorization then click the Authorize button and follow the prompts to give Azure authorization to access your GitHub account.

  4. Click Choose project and select a project.

  5. Click Choose branch and select a branch.

  6. Click OK to complete the setup process.

Now your continuous deployment with GitHub setup is complete. Whenever you commit to the source code repository, your changes will automatically be deployed to the Azure Bot Service.

Continuous deployment using Azure DevOps

  1. In the Azure portal, go to your bot's All App service settings blade and click Deployment options (Classic).

  2. Click Choose Source and select Visual Studio Team Services. Please keep in mind that Visual Studio Team Services is now Azure DevOps Services.

    Choose Visual Studio Team Services

  3. Click Choose your account and select an account.

Note

If you do not see your account listed, you'll need to link your account to your Azure subscription. Note that only VSTS Git projects are supported.

  1. Click Choose project and select a project.

  2. Click Choose branch and select a branch.

  3. Click OK to complete the setup process.

    Visual Studio configuration

Now your continuous deployment with Azure DevOps setup is complete. Whenever you commit, your changes will automatically be deployed to Azure.

Disable continuous deployment

While your bot is configured for continuous deployment, you may not use the online code editor to make changes to your bot. If you want to use the online code editor, you can temporarily disable continuous deployment.

To disable continuous deployment, do the following:

  1. In the Azure portal, go to your bot's All App service settings blade and click Deployment options (Classic).
  2. Click Disconnect to disable continuous deployment. To re-enable continuous deployment, repeat the steps from the appropriate sections above.

Additional information