Skip to content

Commit

Permalink
Update and rename main_my-first-code-on-cloud.yml to cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
umbertocicciaa authored Sep 10, 2024
1 parent 9f79038 commit ef5b7ed
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 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 - my-first-code-on-cloud
name: Cd on azure

on:
push:
Expand All @@ -25,7 +25,7 @@ jobs:
run: dotnet build --configuration Release

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

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
Expand All @@ -39,21 +39,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_FE71647336774C36AD0625F3D70DB031 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_704FA3604AE3450EAEF8A45DDB3E1F24 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_E9644C650EAC4F118459196C7DD867A7 }}

- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_FE71647336774C36AD0625F3D70DB031 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_704FA3604AE3450EAEF8A45DDB3E1F24 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_E9644C650EAC4F118459196C7DD867A7 }}

- name: Deploy to Azure Web App
id: deploy-to-webapp
Expand All @@ -62,4 +62,4 @@ jobs:
app-name: 'my-first-code-on-cloud'
slot-name: 'Production'
package: .


0 comments on commit ef5b7ed

Please sign in to comment.