# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy ASP.Net Core app to Azure Web App - secret-santa

on:
  push:
    branches:
      - trunk

jobs:
  build-and-deploy:
    runs-on: windows-latest

    steps:
    - uses: actions/checkout@master

    - name: Set up .NET Core
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: '5.0.x'

    - name: Build with dotnet
      run: dotnet build --configuration Release

    - name: dotnet publish
      run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp

    - name: Deploy to Azure Web App
      uses: azure/webapps-deploy@v2
      with:
        app-name: 'secret-santa'
        slot-name: 'production'
        publish-profile: ${{ secrets.AzureAppService_PublishProfile_82545db6b514474bbe528b54fa72877a }}
        package: ${{env.DOTNET_ROOT}}/myapp 
Add or update the App Service deployment workflow configuration from Azure Portal.
Add or update the App Service deployment workflow configuration from Azure Portal.