-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 1.02 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Deploying Server
on:
workflow_dispatch:
push:
branches:
- main
env:
AZURE_WEBAPP_NAME: chat-app-server
AZURE_WEBAPP_PACKAGE_PATH: "./publish"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x"
- name: Restore
run: dotnet restore ./Roomify.sln
- name: Build
run: dotnet build ./Roomify.sln --configuration Release --no-restore
- name: Test
run: dotnet test ./Roomify.sln --configuration Release --no-restore
- name: Publish
run: dotnet publish ./src/Roomify.Api/Roomify.Api.csproj --configuration Release --no-build --output '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}'
- name: Deployment
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE }}
package: "${{ env.AZURE_WEBAPP_PACKAGE_PATH }}"