Skip to content

Instantly share code, notes, and snippets.

@mnakka9
Created October 5, 2022 15:14
Show Gist options
  • Select an option

  • Save mnakka9/5f3f7b1e779b7c9b80b55751ab03bbdf to your computer and use it in GitHub Desktop.

Select an option

Save mnakka9/5f3f7b1e779b7c9b80b55751ab03bbdf to your computer and use it in GitHub Desktop.
Pipeline for Ng Universal in IIS
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: '14.x'
displayName: 'Install Node.js'
- script: |
cd nguniversal
npm install -g @angular/cli
npm install
npm run build:ssr
displayName: 'npm install and build'
# Copying all the files from sever folder to root
# (make sure you use appropriate folder names from your project)
- task: CopyFiles@2
inputs:
SourceFolder: 'nguniversal/dist/nguniversal/server'
Contents: '**'
TargetFolder: 'nguniversal/dist/nguniversal'
# Copying web.config from browser folder to root (this is the file we added)
- task: CopyFiles@2
inputs:
SourceFolder: 'nguniversal/dist/nguniversal/browser'
Contents: 'web.config'
TargetFolder: 'nguniversal/dist/nguniversal'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: 'nguniversal/dist/'
ArtifactName: 'dist'
publishLocation: 'Container'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment