Skip to content

Deploy alpinehutscrawler to Azure Function #19

Deploy alpinehutscrawler to Azure Function

Deploy alpinehutscrawler to Azure Function #19

# 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:
- main
paths:
- 'FetchDataFunctions/**'
workflow_dispatch:
env:
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
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
contents: read #This is required for actions/checkout
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_DBB34B9035564BCB84C37651D38E9B5C }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_2502A1678D334FDB8C5E8A355B8FDA36 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_285100F28D1940C490ABD7FCF9EBB957 }}
- 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'