Skip to content

updated the workflow with backend #13

updated the workflow with backend

updated the workflow with backend #13

Workflow file for this run

name: deploy_backend
on:
push:
branches: [ main ]
paths:
- 'backend/**'
env:
AZURE_FUNCTIONAPP_NAME: 'MyGetResumeCounter' # set this to your function app name on Azure
AZURE_FUNCTIONAPP_PACKAGE_PATH: 'backend' # set this to the path to your function app project, defaults to the repository root
DOTNET_VERSION: '6.0.412' # set this to the dotnet version to use (e.g. '2.1.x', '3.1.x', '5.0.x')
jobs:
build-and-deploy:
runs-on: windows-latest
environment: dev
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v3
- name: 'Login via azureCLI'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_RESUME_SECRET }}
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: 'Resolve Project Dependencies Using Dotnet'
shell: pwsh
run: |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/api'
dotnet build --configuration Release --output ./output
popd
- name: 'Run unit test'
shell: pwsh
run: |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/tests'
dotnet test
- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}api/output'