Skip to content

Commit 42f7098

Browse files
committed
add a second deploy target
1 parent ebe8c92 commit 42f7098

2 files changed

Lines changed: 55 additions & 2 deletions

File tree

.github/workflows/build-deploy.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,56 @@ jobs:
164164
}
165165
166166
Write-Host "Deployment completed successfully!"
167+
168+
deploynice:
169+
needs: [build-test, e2e-tests]
170+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
171+
runs-on: windows-latest
172+
173+
steps:
174+
- name: Checkout repository
175+
uses: actions/checkout@v4
176+
177+
- name: Setup .NET 10
178+
uses: actions/setup-dotnet@v4
179+
with:
180+
dotnet-version: '10.0.x'
181+
182+
- name: Publish application
183+
run: dotnet publish src/MyBlog.Web/MyBlog.Web.csproj -c Release -o ./publish -r win-x86 --self-contained false
184+
185+
- name: Deploy via WebDeploy
186+
shell: pwsh
187+
env:
188+
DEPLOY_SOURCE: ${{ github.workspace }}\publish
189+
DEPLOY_SITE: ${{ secrets.NICE_WEBSITE_NAME }}
190+
DEPLOY_HOST: ${{ secrets.NICE_SERVER_COMPUTER_NAME }}
191+
DEPLOY_USER: ${{ secrets.NICE_SERVER_USERNAME }}
192+
DEPLOY_PASSWORD: ${{ secrets.NICE_SERVER_PASSWORD }}
193+
run: |
194+
$msdeployPath = "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe"
195+
196+
if (-not (Test-Path $msdeployPath)) {
197+
Write-Host "Installing Web Deploy..."
198+
choco install webdeploy -y --no-progress
199+
}
200+
201+
Write-Host "Deploying to $env:DEPLOY_HOST..."
202+
Write-Host "Note: Using AppOffline rule to prevent file-in-use errors"
203+
204+
$sourceArg = "-source:contentPath=$env:DEPLOY_SOURCE"
205+
$destArg = "-dest:contentPath=$env:DEPLOY_SITE,computerName=https://$($env:DEPLOY_HOST):8172/MsDeploy.axd?site=$env:DEPLOY_SITE,userName=$env:DEPLOY_USER,password=$env:DEPLOY_PASSWORD,AuthType='Basic'"
206+
207+
& $msdeployPath -verb:sync $sourceArg $destArg `
208+
-allowUntrusted `
209+
-enableRule:DoNotDeleteRule `
210+
-enableRule:AppOffline `
211+
-retryAttempts:3 `
212+
-retryInterval:3000
213+
214+
if ($LASTEXITCODE -ne 0) {
215+
Write-Error "Deployment failed with exit code $LASTEXITCODE"
216+
exit 1
217+
}
218+
219+
Write-Host "Deployment completed successfully!"

docs/llm/dump.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
===============================================================================
22
PROJECT EXPORT
3-
Generated: Thu Jan 29 12:40:10 PM EST 2026
3+
Generated: Fri Jan 30 05:04:49 PM EST 2026
44
Project Path: /home/kushal/src/dotnet/MyBlog
55
===============================================================================
66

@@ -16573,7 +16573,7 @@ window.themeManager = {
1657316573

1657416574

1657516575
===============================================================================
16576-
EXPORT COMPLETED: Thu Jan 29 12:40:11 PM EST 2026
16576+
EXPORT COMPLETED: Fri Jan 30 05:04:50 PM EST 2026
1657716577
Total Files Found: 126
1657816578
Files Exported: 126
1657916579
Files Skipped: 0 (binary or large files)

0 commit comments

Comments
 (0)