I have setup continuous deployment of my .net 6 api to Azure Web apps via a workflow on Github - for reference the base template is azure's "Build and deploy ASP.Net Core app to Azure Web App" Extracts below. I have tried to implement env and my firebase credentials in many different ways within this file (on the job, build, deploy, steps etc) with no success. The environment secret is setup on the GitHub environment but it never pulls through to the environment variables in my deployment. I must be missing something and the use of the azure deployment pipeline makes it harder for me follow and apply the solutions presented in the docs.
name: Build and deploy ASP.Net Core app to Azure Web App
on:
push:
branches:
- Dev
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.FIREBASE_CONFIG }}
steps:
- uses: actions/checkout@v4
- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
include-prerelease: true
....
- name: Env Build Step
run: echo $GOOGLE_APPLICATION_CREDENTIALS
deploy:
runs-on: windows-latest
needs: build
environment:
name: 'Development'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: .net-app
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
....

