Skip to content

Instantly share code, notes, and snippets.

@mithunshanbhag
Last active December 25, 2019 14:17
Show Gist options
  • Save mithunshanbhag/7a4de67243f5639e83104fc045bee547 to your computer and use it in GitHub Desktop.
Save mithunshanbhag/7a4de67243f5639e83104fc045bee547 to your computer and use it in GitHub Desktop.
# build the app
- script: dotnet publish -c ${{parameters.buildConfiguration}} -o ./publish
displayName: dotnet publish
workingDirectory: $(Build.SourcesDirectory)/app-name-redacted
# stop app service
- task: AzureAppServiceManage@0
displayName: stop app service
inputs:
azureSubscription: ${{parameters.azureSubscription}}
action: 'Stop Azure App Service'
webAppName: ${{parameters.webAppName}}
resourceGroupName: ${{parameters.resourceGroupName}}
# deploy to app service
- task: AzureRMWebAppDeployment@4
displayName: deploy to app service
inputs:
azureSubscription: ${{parameters.azureSubscription}}
appType: webAppLinux
webAppName: ${{parameters.webAppName}}
resourceGroupName: ${{parameters.resourceGroupName}}
package: $(Build.SourcesDirectory)/app-name-redacted/publish
removeAdditionalFilesFlag: true
excludeFilesFromAppDataFlag: true
# start app service
- task: AzureAppServiceManage@0
displayName: start app service
inputs:
azureSubscription: ${{parameters.azureSubscription}}
action: 'Start Azure App Service'
webAppName: ${{parameters.webAppName}}
resourceGroupName: ${{parameters.resourceGroupName}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment