Skip to content

Commit eed207f

Browse files
YuvalYuval
authored andcommitted
ci(deploy): consolidate to cd.yml, align backend with Run-From-Package
- Delete .github/workflows/deploy-api.yml (duplicate of cd.yml backend job) - Update cd.yml backend to publish with -r linux-x64 and zip on Linux, matching the strategy documented in DEPLOY.md Step 7.5 to avoid wwwroot corruption from Windows-zipped backslash paths
1 parent f8cd70f commit eed207f

2 files changed

Lines changed: 14 additions & 52 deletions

File tree

.github/workflows/cd.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,26 @@ jobs:
4040
- name: Restore
4141
run: dotnet restore
4242

43-
- name: Publish
44-
run: dotnet publish -c Release -o ./publish --no-restore
43+
# Publish targeting linux-x64 so the output matches the App Service
44+
# runtime and does NOT include runtimes/win/* (backslash paths in those
45+
# files have historically corrupted wwwroot on Linux App Service).
46+
- name: Publish (linux-x64, framework-dependent)
47+
run: dotnet publish -c Release -r linux-x64 --self-contained false -o ./publish-linux --no-restore
48+
49+
# Zip on Linux so path separators are forward slashes. Paired with
50+
# WEBSITE_RUN_FROM_PACKAGE=1 on the App Service, the deploy mounts the
51+
# zip read-only and avoids rsync into the locked wwwroot share.
52+
- name: Package
53+
run: |
54+
cd publish-linux
55+
zip -r ../deploy-linux.zip . -x "*.pdb"
4556
4657
- name: Deploy to Azure App Service
4758
uses: azure/webapps-deploy@v3
4859
with:
4960
app-name: app-groundshare-api
5061
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
51-
package: 02-Server/publish
62+
package: 02-Server/deploy-linux.zip
5263

5364
- name: Health check
5465
run: |

.github/workflows/deploy-api.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)