Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.
name: Build and deploy .NET Core application to Function App JeskeiMediaFunctions20220705210441
on:
push:
branches:
- main
env:
AZURE_FUNCTIONAPP_NAME: JeskeiMediaFunctions20220705210441
AZURE_FUNCTIONAPP_PACKAGE_PATH: JeskeiMediaFunctions\published
CONFIGURATION: Release
DOTNET_CORE_VERSION: 6.0.x
WORKING_DIRECTORY: JeskeiMediaFunctions
jobs:
build-and-deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
- name: Restore
run: dotnet restore "${{ env.WORKING_DIRECTORY }}"
- name: Build
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore
- name: Publish
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build --output "${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}"
- name: Deploy to Azure Function App
uses: Azure/functions-action@v1
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }}
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}