6

I have a webapp on Azure that is connected to github to do continuous deployment. Is there any quick way to change the branch it is connected to or I have to disconnect and then connect again to select the new branch?

The problem is that Azure has a bug somewhere that when I disconnect I can only connect again without an error, after 15 or 30 minutes of disconnecting...

juvchan
  • 6,113
  • 2
  • 22
  • 35
AlfaTeK
  • 7,487
  • 14
  • 49
  • 90

2 Answers2

12

Try go to your scm site "https://{site name}.scm.azurewebsites.net"

Debug Console -> Navigate to D:\home\site\deployments

Edit settings.xml and change to your desire branch.

<?xml version="1.0" encoding="utf-8"?>
<settings>
    <deployment>
        <add key="branch" value="master" />
    </deployment>
</settings>
Xiaomin Wu
  • 3,621
  • 1
  • 15
  • 14
  • After doing that, is there any command or way in there to manually tell azure to update the website? the only way i found is to go to azure portal and hit sync on continuous deployments but I was looking for a quicker way :) – AlfaTeK Feb 18 '16 at 10:35
  • @AlfaTeK try: ` az login az webapp deployment source sync -n ` – Vlax Aug 18 '18 at 09:40
1

Using the xplat-cli you can do:

azure site repository <yourbranch>
azure site repository sync
jakobandersen
  • 1,399
  • 7
  • 9
  • in azure-cli (2.0.44), it's more like ` az webapp deployment source delete -n az webapp deployment source config -n --repo-url $url --branch --git-token --manual-integration az webapp deployment source sync -n ` – Vlax Aug 18 '18 at 09:31
  • but it seems to be very buggy, probably @Xiaomin Wu answer is more suitable – Vlax Aug 18 '18 at 09:39