简体   繁体   中英

How to deploy Angular application to IIS-manager?

I know the question is some kind of generic, but there are two solutions I have in mind but can't manage to fix. I will update the question if there's a better summary of the problem..

I'm deploying an Angular application from the Azure DevOps Pipeline to IIS Manager on my Windows Server.

Everytime while the build is successfull there is Artifact created, this artifact is a .zip file with a folder named: staad-portal , in this folder the Angular dist files are stored. Alright this works fine.

This is how the artifact is created in YAML

steps:
- task: ArchiveFiles@2
  displayName: 'Archive staad-portaal-frontend\dist\staad-portal'
  inputs:
    rootFolderOrFile: 'staad-portaal-frontend\dist\staad-portal'

But when I release this to the IIS manager, the Physical Path of the website changes all the time to the root folder to: C:\\build\\root while it has to be C:\\build\\root\\staad-portal . I expect this is to be overridden every release so the website loses it's path.

I had two things in mind:

  1. Maybe there is a way in IIS manager to set the path, which won't be changed automatically?
  2. Remove the staad-portal within the artifact .zip.

I have no clue how to achieve both. Can anyone push me in the right direction, other solutions are as much as welcome.

Maybe there is a way in IIS manager to set the path, which won't be changed automatically?

For this question, you can specified the absolute path( C:\\build\\root\\staad-portal ) to the parameter Physical path of WinRM - IIS Web App Management .

To remove the file staad-portal which within your artifacts file, you can run delete files . Specified the Source folder and Content . In content you can use wildcard character such as *.zip .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM