Skip to content

Update README.md

Update README.md #93

Workflow file for this run

# 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 - Gateway
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read #This is required for actions/checkout
steps:
- uses: actions/checkout@v4
- name: Set up .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Build Gateway project
run: dotnet build src/backend/Gateway/Gateway.csproj --configuration Release
- name: Publish Gateway project
run: dotnet publish src/backend/Gateway/Gateway.csproj -c Release -o ${{env.DOTNET_ROOT}}/myapp
- name: Zip published Gateway app
run: cd ${{env.DOTNET_ROOT}} && zip -r myapp.zip myapp
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: myapp
path: ${{env.DOTNET_ROOT}}/myapp.zip
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
id-token: write #This is required for requesting the JWT
contents: read #This is required for actions/checkout
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: myapp
path: ./artifact
- name: List downloaded files
run: ls -la artifact && ls -la artifact/*.zip
- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_53A764BA120245DAA629D6794EAF9C22 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_39CBE0C302F2432EABACBFABADBBD12F }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_436374D41D6C44689EDBFDE45E3572D7 }}
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
with:
app-name: 'Gateway'
slot-name: 'Production'
package: ./artifact/myapp.zip