Skip to content

Merge pull request #242 from sebader/dev #9

Merge pull request #242 from sebader/dev

Merge pull request #242 from sebader/dev #9

# 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: Deploy alpinehutscrawler to Azure Function
on:
push:
branches:
- dev
- main
paths:
- 'FetchDataFunctions/**'
workflow_dispatch:
env:
AZURE_FUNCTIONAPP_PACKAGE_PATH: './FetchDataFunctions'
DOTNET_VERSION: '8.0.x' # set this to the dotnet version to use
jobs:
build-and-deploy:
runs-on: windows-latest
permissions:
id-token: write #This is required for requesting the JWT
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: 'Resolve Project Dependencies Using Dotnet'
shell: pwsh
run: |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
dotnet build --configuration Release --output ./output
popd
- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_1249D1E14BB34B67BB96AE010A6623E2 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_DE6CE784D53041A9BA1C3296086E36C8 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_C0F2B642B5AA42FA9A99B8526484C752 }}
- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: 'alpinehutscrawler'
slot-name: 'Production'
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output'