Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Commit

Permalink
Refactor Azure workflow to separate build and
Browse files Browse the repository at this point in the history
deploy jobs
  • Loading branch information
Aloento committed Dec 5, 2023
1 parent 6afd0e1 commit 0712bc7
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/Azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ on:
- Dev

jobs:
build_deploy:
build:
runs-on: ubuntu-latest
name: Build and Deploy

steps:
- uses: actions/checkout@v4
Expand All @@ -22,11 +21,30 @@ jobs:
- name: Build with dotnet
run: dotnet publish SoarCraft.AwaiShop/SoarCraft.AwaiShop.csproj -c Release -o ${{env.DOTNET_ROOT}}/myapp

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: .net-app
path: ${{env.DOTNET_ROOT}}/myapp

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: "Production"
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
with:
app-name: "Awai"
slot-name: "Production"
package: ${{env.DOTNET_ROOT}}/myapp
package: .
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_C99EA4B4F77A41508E090AF728BF173A }}

0 comments on commit 0712bc7

Please sign in to comment.