-
-
Notifications
You must be signed in to change notification settings - Fork 17
59 lines (49 loc) · 1.55 KB
/
main_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
57
58
59
name: Deploy
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Test
run: dotnet test --no-build --verbosity normal -c Release
- name: Publish API
uses: ./.github/actions/template_pack-dotnet
with:
projectFile: "src/UpBlazor.WebApi/UpBlazor.WebApi.csproj"
outputFolder: "./API"
zip: true
- name: Publish UI
uses: ./.github/actions/template_pack-dotnet
with:
projectFile: "src/UpBlazor.WebUI/UpBlazor.WebUI.csproj"
outputFolder: "./UI"
- name: Deploy API
id: deploy-api
uses: azure/webapps-deploy@v2
with:
app-name: 'upblazor-webapi'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_1A26B43F89B34C58ADF4A707F0D8B3E8 }}
package: "./publish/API.zip"
- name: Copy Static Web Apps Config
run: cp ./publish/UI/staticwebapp.config.json ./publish/UI/wwwroot
- name: Deploy UI
id: deploy-ui
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_NICE_GLACIER_04F65F810 }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "./publish/UI/wwwroot"
skip_app_build: true