Fix the deployment to text-compare2 on azure #62
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Configuration
1. Build and Deploy
In the deployment pipeline, add steps to install dependencies and build the Angular project:
2. Configure Output Folder
Since only the static files are required for the Angular application, set the build output folder (
./dist/browser) as the artifact to upload for the deployment job. This helps reduce the size of the deployment package.3. Clean Previous Deployment
Before deploying a new version, clean the existing files in the Azure App Service
wwwrootdirectory.Enable automatic cleanup by adding:
with: clean: true4. Startup Command
Angular’s build output (
dist) contains only static files, while Azure Linux App Service expects a running web server. Therefore, we need to configure a Startup Command to serve the Angular app.npx serve -s . -l 8080Inspection
Debug Console
If you need to inspect the deployed files on Azure, you can use the Debug Console at: https://text-compare2.scm.azurewebsites.net/DebugConsole .
Or you can find it through the following steps:
Bashon the topTest
Deployment should be complete. You can verify it at https://text-compare2.azurewebsites.net/.