Azure / ng-deploy-azure

Deploy Angular apps to Azure using the Angular CLI
MIT License
79 stars 37 forks source link

Skip build and deploy directly is not working as described #100

Open de87684333 opened 3 years ago

de87684333 commented 3 years ago

I'd like to avoid building automatically and deploying directly from a path, ideally I'd like to get an error if the path to be deployed is not existing or empty.

So I followed what is described in the README:

Another option is to skip build, and deploy directly from a specific location. To do this, delete the target and configuration from azure.json, and provide a path with a value relative to the root of the project.

Prequisite: I first built with the configuration I need & "ng add ng-deploy-azure" run

If I only add "path", "ng run hello-world:deploy" is deploying without building as expected:

Example azure.json

{ "hosting": [ { "app": { "project": "hello-world", "target": "build", "configuration": "production" "path": "public/static/hello-world" }, "azureHosting": { ... } } ] }

But if I follow exactly what is described, I mean removing target & config, to avoid the automatic build, I got the following error message:

Error when trying to deploy: Azure hosting config is missing some details. Please run "ng add ng-deploy-azure" and select a storage account.

Example azure.json

{ "hosting": [ { "app": { "project": "hello-world", "path": "public/static/hello-world" }, "azureHosting": { ... } } ] }

I'd like to know what should I keep and what I can remove from this file to achieve my goal : deploying without building and getting an error if the app has not been built before (path empty or not existing)? I think that the README should be updated. Thanks for your help

remybd commented 3 years ago

Hello

On our side, we add the same problem and we add "target": "deploy", inside the app { "hosting": [ { "app": { "project": "hello-world", "target": "deploy", "path": "dist/hello-world" }, "azureHosting": { ... } } ] }

Hope it's help