Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/web-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@ jobs:
uses: actions/download-artifact@v4
with:
name: .net-app
path: app

# OneDeploy (type: zip) takes a .zip file, not a folder. Entry names are written with forward slashes, as the
# zip format requires; some Windows zip APIs write backslashes, which App Service would extract as flat names.
- name: Zip the app
shell: pwsh
run: |
Add-Type -AssemblyName System.IO.Compression, System.IO.Compression.FileSystem
$source = (Resolve-Path app).Path.TrimEnd('\', '/')
$zip = [System.IO.Compression.ZipFile]::Open("${{ runner.temp }}/app.zip", 'Create')
try {
Get-ChildItem $source -Recurse -File | ForEach-Object {
$name = $_.FullName.Substring($source.Length + 1).Replace('\', '/')
[System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($zip, $_.FullName, $name, 'Optimal') | Out-Null
}
} finally { $zip.Dispose() }

# clean: true empties wwwroot before extracting, so no file from an earlier release survives. A stale static
# asset makes MapStaticAssets answer 500, because its size no longer matches the endpoints manifest.
Expand All @@ -59,7 +75,7 @@ jobs:
app-name: 'blazorbootstrap'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_1F484B42E8E9491C82F21EED2A6E2C15 }}
package: .
package: ${{ runner.temp }}/app.zip
type: zip
clean: true
restart: true
Loading