Skip to content

Commit

Permalink
main_mitelkshome.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mitelk03 authored Nov 2, 2024
1 parent 21910ed commit 30ff548
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions .github/workflows/main_mitelkshome.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy ASP.Net Core app to Azure Web App - MitelksHome

on:
Expand All @@ -22,10 +19,10 @@ jobs:
dotnet-version: '8.x'

- name: Build with dotnet
run: dotnet build --configuration Release
run: dotnet build MainPage --configuration Release

- name: dotnet publish
run: dotnet publish -c Release -o "${{env.DOTNET_ROOT}}/myapp"
run: dotnet publish MainPage -c Release -o "${{env.DOTNET_ROOT}}/myapp"

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
Expand All @@ -39,21 +36,21 @@ jobs:
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
permissions:
id-token: write #This is required for requesting the JWT
permissions:
id-token: write #This is required for requesting the JWT

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: .net-app

- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_6DDF1166E4914473ADD6D15E678B57B2 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_C358623F78F3403AB630E64ADA398C2A }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_86B1D7AD2FC74A7192A1B29297286205 }}

- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_6DDF1166E4914473ADD6D15E678B57B2 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_C358623F78F3403AB630E64ADA398C2A }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_86B1D7AD2FC74A7192A1B29297286205 }}

- name: Deploy to Azure Web App
id: deploy-to-webapp
Expand All @@ -62,4 +59,3 @@ jobs:
app-name: 'MitelksHome'
slot-name: 'Production'
package: .

0 comments on commit 30ff548

Please sign in to comment.