Skip to content

af0e-functions - main to prod #2

af0e-functions - main to prod

af0e-functions - main to prod #2

# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: af0e-functions - main to prod
on:
push:
branches:
- main
paths:
- 'src/AF0E.Functions/**'
workflow_dispatch:
env:
AZURE_FUNCTIONAPP_PACKAGE_PATH: 'src/AF0E.Functions' # set this to the path to your web app project, defaults to the repository root
DOTNET_VERSION: '8.x' # set this to the dotnet version to use
jobs:
build-and-deploy:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build
shell: pwsh
run: |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
dotnet build --configuration Release --output ./output
popd
- name: Deploy to Azure
uses: Azure/functions-action@v1
id: fa
with:
app-name: 'af0e-functions'
slot-name: 'Production'
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output'
publish-profile: ${{ secrets.DX_SCRAPER_FN_PROD_PUBLISH_PROFILE }}