Skip to content

Merge pull request #12 from Geims83/nullableSensorData #9

Merge pull request #12 from Geims83/nullableSensorData

Merge pull request #12 from Geims83/nullableSensorData #9

Workflow file for this run

name: Build and deploy .NET Core Function App to Azure functions app
on:
push:
branches:
- main
env:
AZURE_FUNCTIONAPP_NAME: nerdostat-api
AZURE_FUNCTIONAPP_PACKAGE_PATH: api/publish
CONFIGURATION: Release
DOTNET_CORE_VERSION: 6.0.x
WORKING_DIRECTORY: api
jobs:
build-and-deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- 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.nerdostat_api_969f }}
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}