Merge pull request #249 from sebader/dependabot/nuget/FetchDataFuncti… #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' | |