-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.23 KB
/
Copy pathdeploy-azure-swa.yml
File metadata and controls
46 lines (39 loc) · 1.23 KB
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
name: Deploy (Azure Static Web Apps)
on:
workflow_dispatch:
push:
branches:
- main
- master
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Publish (Azure SWA)
shell: pwsh
run: |
./specs/001-add-wasm-hosting/scripts/publish-browser-hosted.ps1 \
-Platform azure-swa \
-Configuration Release
- name: Deploy to Azure Static Web Apps
if: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN != '' }}
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: upload
app_location: ReleaseDownload/browser-hosted/azure-swa/Release/wwwroot
skip_app_build: true
skip_api_build: true
- name: Skipped (missing token)
if: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN == '' }}
run: |
echo "AZURE_STATIC_WEB_APPS_API_TOKEN is not set; skipping deploy."