-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (33 loc) · 1.12 KB
/
BuildDeploy-API.yaml
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
42
43
name: BuildDeploy API
on:
push:
branches: main
paths:
- 'cocktails/**'
workflow_dispatch:
jobs:
Build-Publish-Deploy:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore, Build, Test, Publish
run: |
cd cocktails
dotnet restore
dotnet build --no-restore
dotnet test --no-build --verbosity normal
dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp
- name: Deploy App to Azure WebService
uses: Azure/[email protected]
with:
#publish-profile: ${{ secrets.COCKTAIL_API_MCAPS_F25_PUBLISH_PROFILE }}
publish-profile: ${{ secrets.TEST_BACKEND }}
# Enter an existing Slot other than the Production slot
#slot-name: # optional, default is production
# Applies to Web App only: Path to package or folder. *.zip, *.war, *.jar or a folder to deploy
package: ${{env.DOTNET_ROOT}}/myapp