-
Notifications
You must be signed in to change notification settings - Fork 16
62 lines (51 loc) · 1.59 KB
/
voting-web-app.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Build and Deploy VotingWeb App
on:
push:
branches:
- master
paths:
- 'code/web-app-ri/VotingWeb/**'
jobs:
build:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET Core 3
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup .NET Core 7
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Restore NuGet Packages
run: dotnet restore ${{ vars.VOTINGWEB_APPPATH }}
- name: Build
run: dotnet build ${{ vars.VOTINGWEB_APPPATH }} --configuration ${{ vars.BUILDCONFIGURATION }} --no-restore
- name: Publish
run: dotnet publish ${{ vars.VOTINGWEB_APPPATH }} --configuration ${{ vars.BUILDCONFIGURATION }} --output ${{ github.workspace }}/VoteWeb --no-restore
- name: Archive Files
uses: actions/upload-artifact@v2
with:
name: drop
path: ${{ github.workspace }}/VoteWeb
deploy:
needs: build
runs-on: self-hosted
environment: 'production'
steps:
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- uses: actions/download-artifact@master
with:
name: drop
path: ${{ github.workspace }}/VoteWeb
- name: Deploy
uses: azure/webapps-deploy@v2
with:
app-name: ${{ vars.VOTINGWEB_APP_NAME }}
package: ${{ github.workspace }}/VoteWeb
slot-name: production