Skip to content

Instantly share code, notes, and snippets.

@geralexgr
Created June 23, 2022 12:47
Show Gist options
  • Save geralexgr/3392bf9fe175b7f12150b57296fa2b29 to your computer and use it in GitHub Desktop.
Save geralexgr/3392bf9fe175b7f12150b57296fa2b29 to your computer and use it in GitHub Desktop.
trigger:
- none
pool:
vmImage: windows-latest
steps:
- task: VSBuild@1
displayName: Build appservice
inputs:
solution: '$(Build.SourcesDirectory)/Front/**\*.sln'
msbuildArgs: '/p:Configuration=Debug /p:Platform="Any CPU" /p:WebPublishMethod=FileSystem /p:publishUrl="$(Build.ArtifactStagingDirectory)/build" /p:DeployOnBuild=true'
clean: true
- task: ArchiveFiles@2
displayName: create archive for app service deployment
inputs:
rootFolderOrFile: '$(Build.ArtifactStagingDirectory)\build'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.StagingDirectory)/$(Build.BuildId).zip'
replaceExistingArchive: true
- task: AzureRmWebAppDeployment@4
displayName: deploy app service
inputs:
ConnectionType: 'AzureRM'
azureSubscription: 'ServiceConnectionName'
appType: 'webApp'
WebAppName: 'AppServiceName'
packageForLinux: '$(Build.StagingDirectory)/**/*.zip'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment