Advertisement
zungtaz156

Untitled

May 9th, 2021
1,326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.49 KB | None | 0 0
  1. # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
  2. # More GitHub Actions for Azure: https://github.com/Azure/actions
  3.  
  4. name: Build and deploy ASP app to Azure Web App - supermarket-n12
  5.  
  6. on:
  7.   push:
  8.     branches:
  9.      - master
  10.   workflow_dispatch:
  11. jobs:
  12.   build:
  13.     runs-on: 'windows-latest'
  14.  
  15.     steps:
  16.     - uses: actions/checkout@v2
  17.  
  18.     - name: Setup MSBuild path
  19.       uses: microsoft/setup-msbuild@v1.0.2
  20.  
  21.     - name: Setup NuGet
  22.       uses: NuGet/setup-nuget@v1.0.5
  23.  
  24.     - name: Restore NuGet packages
  25.       run: nuget restore
  26.  
  27.     - name: Publish to folder
  28.       run: msbuild /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="\published\"
  29.  
  30.     - name: Upload artifact for deployment job
  31.       uses: actions/upload-artifact@v2
  32.       with:
  33.         name: ASP-app
  34.         path: '/published/**'
  35.  
  36.   deploy:
  37.     runs-on: 'windows-latest'
  38.     needs: build
  39.     environment:
  40.       name: 'production'
  41.       url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
  42.  
  43.     steps:
  44.     - name: Download artifact from build job
  45.       uses: actions/download-artifact@v2
  46.       with:
  47.         name: ASP-app
  48.  
  49.     - name: Deploy to Azure Web App
  50.       id: deploy-to-webapp
  51.       uses: azure/webapps-deploy@v2
  52.       with:
  53.         app-name: 'supermarket-n12'
  54.         slot-name: 'production'
  55.         publish-profile: ${{ secrets.AzureAppService_PublishProfile_327fe2824a7043d39420817fd00651e0 }}
  56.         package: .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement