Skip to content

Merge pull request #188 from jamesmontemagno/patch-1 #16

Merge pull request #188 from jamesmontemagno/patch-1

Merge pull request #188 from jamesmontemagno/patch-1 #16

Workflow file for this run

name: Deploy to Azure Web App
on:
push:
branches:
- master
env:
AZURE_WEBAPP_NAME: fuget
AZURE_WEBAPP_PACKAGE_PATH: '.'
DOTNET_VERSION: '5.0.x'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: dev
steps:
# Checkout the repo
- uses: actions/[email protected]
# Setup .NET Core SDK
- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
# Run dotnet build and publish
- name: Build and publish
run: |
dotnet restore
dotnet build --configuration Release
dotnet publish -c Release -o '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/${{ env.AZURE_WEBAPP_NAME }}'
# Deploy to Azure Web apps
- name: 'Run Azure webapp deploy'
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }} # Replace with your app name
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} # Define secret variable in repository settings as per action documentation
package: '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/${{ env.AZURE_WEBAPP_NAME }}'