能否通过AZ CLI更新Azure Static Web Apps的staticwebapp配置JSON文件?
Azure Static Web Apps 配置文件更新方式
你可以直接通过Azure CLI更新staticwebapp.config.json,不需要执行完整的部署操作,步骤如下:
- 准备好本地修改后的
staticwebapp.config.json文件 - 运行以下CLI命令完成更新:
az staticwebapp config set --name <你的静态Web应用名称> --resource-group <对应资源组名称> --config-file-path ./staticwebapp.config.json - 验证更新结果,可使用命令:
az staticwebapp config show --name <你的静态Web应用名称> --resource-group <对应资源组名称>
注意:这种方式仅适合短期应急场景,长期管理建议通过代码仓库结合部署流水线(如GitHub Actions)来维护配置文件,保证配置的版本可控和部署一致性。
内容的提问来源于stack exchange,提问作者user3067684
相关产品推荐
相关产品推荐

