-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (39 loc) · 1.51 KB
/
deploy-demo-site.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
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy Demo sites
on:
workflow_dispatch:
inputs:
sampleProjectName:
description: 'Sample Project Name'
required: true
default: 'Basic'
env:
PROJECT_PATH: ./samples/${{ github.event.inputs.sampleProjectName }}/${{ github.event.inputs.sampleProjectName }}.csproj
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Build with dotnet
run: dotnet build ${{ env.PROJECT_PATH }} --configuration Release
- name: dotnet publish
run: dotnet publish ${{ env.PROJECT_PATH }} -c Release -o ${{env.DOTNET_ROOT}}/myapp
- name: Deploy to Azure Web App (Windows)
uses: azure/webapps-deploy@v2
with:
app-name: 'aspnetcoreversioninfo-demo'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_0819e02428474e0e9a2ecf8fe5c64165 }}
package: ${{env.DOTNET_ROOT}}/myapp
- name: Deploy to Azure Web App (Linux)
uses: azure/webapps-deploy@v2
with:
app-name: 'aspnetcoreversioninfo-linux-demo'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_Linux_Demosite }}
package: ${{env.DOTNET_ROOT}}/myapp