-
Notifications
You must be signed in to change notification settings - Fork 9
56 lines (45 loc) · 1.39 KB
/
azure-app-svc-linux-deploy.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
name: AppSvc Linux
on: [push]
env:
AZURE_RESOURCE_GROUP: blazor-deployment-samples
AZURE_APP_NAME: bwasm-linux-server
defaults:
run:
working-directory: blazor-sample-app
jobs:
build:
if: github.event_name == 'push' && contains(toJson(github.event.commits), '***NO_CI***') == false && contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.300
- name: Restore
run: dotnet restore
- name: Build with dotnet
run: dotnet build --configuration Release --no-restore
- name: Publish with dotnet
run: dotnet publish --configuration Release -o ../published_app --no-build
- name: Publish artifacts
uses: actions/upload-artifact@v2
with:
name: webapp
path: published_app/wwwroot
deploy:
needs: build
name: Deploy
runs-on: ubuntu-latest
steps:
# Download artifacts
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: webapp
# Deploy to App Service Linux
- uses: azure/webapps-deploy@v2
with:
publish-profile: ${{ secrets.BWASM_PUB_PROFILE }}
app-name: ${{ env.AZURE_APP_NAME }}