Static-web-apps: Change Branch from `master` to `main` in Environments

Created on 25 Jun 2020  Â·  6Comments  Â·  Source: Azure/static-web-apps

Hi, I changed my default branch in github from master to main. Is it possible to update my environments to use main as the new build branch? I don't see an easy way of editing this on Azure.

Most helpful comment

Ahh it appears after reconnecting my github actions workflow was updated and it modified the app directory to the default value of ".". I updated my workflow yaml and all is good now.

All 6 comments

Fresh out of the press, the az cli support.

You could use az cli to disconnect and reconnect

https://docs.microsoft.com/en-us/cli/azure/staticwebapp?view=azure-cli-latest

Let us know if this helps.

Thanks! I don't see an update parameter for environment:

(azureml) ➜  ~ az staticwebapp environment -h

Group
    az staticwebapp environment : Manage environment of the static app.
        Command group 'staticwebapp' is in preview. It may be changed/removed in a future
        release.
Commands:
    functions : Show information about functions.
    list      : List all environment of the static app including production.
    show      : Show information about the production environment or the specified environment.

For more specific examples, use: az find "az staticwebapp environment"

Please let us know how we are doing: https://aka.ms/azureclihats

Ah I guess I can do a disconnect and then a reconnect?

My app directory is docs. I don't see an argument for --app-artifact-location when I do reconnect, and it looks like reconnect defaulted to . rather than what I had originally. Is there a way I can specify the location of the app when I reconnect?

@ElleTojaroon could you please help add the parameter.

@akzaidi to mitigate can you update the workflow file. Does that work for now?

Ahh it appears after reconnecting my github actions workflow was updated and it modified the app directory to the default value of ".". I updated my workflow yaml and all is good now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

empz picture empz  Â·  4Comments

trevorkennedy picture trevorkennedy  Â·  4Comments

ShanonJackson picture ShanonJackson  Â·  3Comments

mahmoudajawad picture mahmoudajawad  Â·  3Comments

thomastvedt picture thomastvedt  Â·  5Comments