Skip to content

🛠️ Improving grid styles #73

🛠️ Improving grid styles

🛠️ Improving grid styles #73

name: AFM Backend Functions Deployment
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the 'main' branch
push:
paths-ignore:
- "src/AnimeFeedManager.Web"
- "deployment/*"
- "!deployment/main-functions.bicep"
- "**/*.md"
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
AZURE_FUNCTIONAPP_PACKAGE_PATH: "./src/AnimeFeedManager.Functions" # set this to the path to your web app project, defaults to the repository root
TEST_PROJECT_PATH: "./src/AnimeFeedManager.Features.Tests"
DOTNET_VERSION: "9.0.x" # set this to the dotnet version to use
# login with OIDC permissions
permissions:
id-token: write
contents: read
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-and-deploy-functions:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout GitHub Action
uses: actions/checkout@v4.1.6
with:
submodules: true
clean: true
- name: Azure Login
uses: azure/login@v2.1.1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
# Get variables from infrastructure
- name: Get variables from infrastructure
uses: Azure/arm-deploy@v2
id: infrastructure
with:
scope: resourcegroup
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resourceGroupName: ${{ secrets.AZURE_RG }}
template: ./deployment/main-functions.bicep
failOnStdErr: false
# Builds and Deploys functions
- 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: bash
run: |
pushd '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
dotnet publish --configuration Release --output ./output
popd
- name: Test Using Dotnet
shell: bash
run: dotnet test '${{ env.TEST_PROJECT_PATH }}'
- name: Run Azure Functions Action
uses: Azure/functions-action@v1.5.1
id: fa
with:
slot-name: "Production"
app-name: ${{ steps.infrastructure.outputs.appname }}
package: "${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output"