From bca3e1dd42ca3192e60897ba393894e7768d8a65 Mon Sep 17 00:00:00 2001 From: sadegh Farokhi <47900503+syntax24@users.noreply.github.com> Date: Wed, 5 Nov 2025 13:36:44 +0330 Subject: [PATCH] Delete .github/workflows/dad-mehrPublish.yaml --- .github/workflows/dad-mehrPublish.yaml | 67 -------------------------- 1 file changed, 67 deletions(-) delete mode 100644 .github/workflows/dad-mehrPublish.yaml diff --git a/.github/workflows/dad-mehrPublish.yaml b/.github/workflows/dad-mehrPublish.yaml deleted file mode 100644 index 5514b521..00000000 --- a/.github/workflows/dad-mehrPublish.yaml +++ /dev/null @@ -1,67 +0,0 @@ -name: Build & Deploy .NET App to IIS - -on: - push: - branches: - - WorskhopClassifiedPlan - -jobs: - build-and-deploy: - runs-on: windows-latest - - steps: - # ===================== CHECKOUT CODE ===================== - - name: Checkout code - uses: actions/checkout@v4 - - # ===================== SETUP .NET SDK ===================== - - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' - - # ===================== RESTORE DEPENDENCIES ===================== - - name: Restore dependencies - run: dotnet restore - - - # ===================== BUILD PROJECT ===================== - - name: Build Project - run: dotnet build --configuration Release - - # --- 4. Build- - - name: Build - run: dotnet build --configuration Release - - - # ===================== PUBLISH PROJECT ===================== - - name: Publish Project - shell: powershell - run: | - $publishFolder = Join-Path $env:GITHUB_WORKSPACE "publish" - Write-Host "Publishing to folder: $publishFolder" - dotnet publish --configuration Release --output "$publishFolder" --no-build /p:EnvironmentName=Production - - # ===================== DEPLOY TO IIS SERVER ===================== - - name: Deploy to IIS via SSH - uses: appleboy/ssh-action@v1.0.0 - with: - host: ${{ secrets.REMOTE_HOST }} - username: ${{ secrets.REMOTE_USER }} - password: ${{ secrets.REMOTE_PASS }} - script: | - $siteName = "dad-mehr" - $source = "D:\a\${{ github.event.repository.name }}\${{ github.event.repository.name }}\publish" - $destination = "C:\inetpub\wwwroot\dad-mehr" - - Write-Host "Stopping IIS site $siteName ..." - & "C:\Windows\System32\inetsrv\appcmd.exe" stop site $siteName | Out-Null - - Write-Host "Copying files from $source to $destination ..." - robocopy $source $destination /E /XO /R:2 /W:3 /NFL /NDL /NP - - Write-Host "Starting IIS site $siteName ..." - & "C:\Windows\System32\inetsrv\appcmd.exe" start site $siteName | Out-Null - - Write-Host "✅ Deployment completed successfully." -