Moving app settings into flex bicep script #60
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
name: Azure Functions CI/CD | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'app/backend/**' | |
- '.github/workflows/azure-static-web-apps-backend.yml' | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
branches: | |
- main | |
env: | |
AZURE_FUNCTIONAPP_NAME: enterprise-gpt-backend # set this to your application's name | |
AZURE_FUNCTIONAPP_PACKAGE_PATH: 'app/backend' # 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 (e.g. '2.1.x', '3.1.x', '5.0.x') | |
jobs: | |
build_and_deploy_job: | |
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') | |
runs-on: ubuntu-latest | |
name: Build and Deploy Job | |
steps: | |
- name: 'Checkout GitHub Action' | |
uses: actions/checkout@v3 | |
- 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: bash | |
run: | | |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}' | |
dotnet build --configuration Release --output ./output | |
popd | |
# Uncomment if publishing app after setting up Azure credentials. | |
# - 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 }}/output' | |
# publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }} |