From 750366674097da60000144ab2ad7679a19393160 Mon Sep 17 00:00:00 2001 From: rajson49-hue Date: Sat, 4 Oct 2025 17:05:15 +0200 Subject: [PATCH] prod CD also included --- .github/workflows/pr-verify.yml | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-verify.yml b/.github/workflows/pr-verify.yml index 8e2217af..c7c044c2 100644 --- a/.github/workflows/pr-verify.yml +++ b/.github/workflows/pr-verify.yml @@ -2,7 +2,8 @@ name: PR Verify # These are the veriables which you could use in your workflows env: - AZURE_WEBAPP_NAME: app-dev-rajsonawala # set this to the name of your Azure Web App + AZURE_WEBAPP_NAME_DEV: app-dev-rajsonawala # set this to the name of your Azure Web App + AZURE_WEBAPP_NAME_PROD: app-prod-rajsonawala AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root DOTNET_VERSION: '8.0' # set this to the .NET Core version to use @@ -65,7 +66,34 @@ jobs: - name: 'Deploy to Azure App Service' uses: azure/webapps-deploy@v2 with: - app-name: ${{ env.AZURE_WEBAPP_NAME }} # Replace with your app name + app-name: ${{ env.AZURE_WEBAPP_NAME_DEV }} # Replace with your app name + package: artifacts/ + + deploy_prod: + name: Deploy Prod + runs-on: ubuntu-latest + needs: build # wait for other job to finish g + environment: prod + + steps: + - name: Azure login + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENATE_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + + + - uses: actions/download-artifact@v4 + with: + name: my-artifact + path: artifacts/ + + # Deploy to Azure Web apps + - name: 'Deploy to Azure App Service' + uses: azure/webapps-deploy@v2 + with: + app-name: ${{ env.AZURE_WEBAPP_NAME_PROD }} # Replace with your app name package: artifacts/