Skip to content

Commit eeb3832

Browse files
committed
Can't deploy PostDeploymentActions, trying it by hand
1 parent b477c8d commit eeb3832

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,3 @@ jobs:
6666
# Clean deployments would wipe all files from the server, deleting the SQLite DB and Media files too.
6767
clean: false
6868

69-
- name: Remove App Offline from Azure Web App
70-
uses: azure/webapps-deploy@v3
71-
with:
72-
app-name: 'orcharddotnet'
73-
slot-name: 'Production'
74-
package: PostDeploymentActions
75-
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_4FE0CF1DE8714910989348B2AF6EDB6D }}
76-
clean: false
77-
target-path: D:/site/deployments/tools/PostDeploymentActions/

OrchardCore.Web/OrchardCore.Web.csproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,12 @@
99

1010
<ItemGroup>
1111
<None Remove="AppOffline\app_offline.htm" />
12-
<None Remove="PostDeploymentActions\RemoveAppOffline.ps1" />
1312
</ItemGroup>
1413

1514
<ItemGroup>
1615
<Content Include="AppOffline\app_offline.htm">
1716
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1817
</Content>
19-
<Content Include="PostDeploymentActions\marker.txt">
20-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
21-
</Content>
22-
<Content Include="PostDeploymentActions\RemoveAppOffline.ps1">
23-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
24-
</Content>
2518
</ItemGroup>
2619

2720
<ItemGroup>

OrchardCore.Web/PostDeploymentActions/RemoveAppOffline.ps1

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

OrchardCore.Web/PostDeploymentActions/marker.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

OrchardCore.Web/web.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- This file needs to be deployed by hand, via FTP or Kudu, it's not picked up by the deployment workflow. -->
32
<configuration>
43
<location path="." inheritInChildApplications="false">
54
<system.webServer>

OrchardCore.Website.sln

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
77
ProjectSection(SolutionItems) = preProject
88
NuGet.config = NuGet.config
99
README.md = README.md
10+
PostDeploymentActions\Readme.md = PostDeploymentActions\Readme.md
11+
PostDeploymentActions\RemoveAppOffline.ps1 = PostDeploymentActions\RemoveAppOffline.ps1
1012
Reset-Local.ps1 = Reset-Local.ps1
1113
EndProjectSection
1214
EndProject
@@ -20,8 +22,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{02EA
2022
EndProject
2123
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{626A55B0-ACA9-4FFF-943A-9152ACB7CF08}"
2224
ProjectSection(SolutionItems) = preProject
23-
.github\workflows\deploy.yml = .github\workflows\deploy.yml
2425
.github\workflows\ci.yml = .github\workflows\ci.yml
26+
.github\workflows\deploy.yml = .github\workflows\deploy.yml
27+
EndProjectSection
28+
EndProject
29+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PostDeploymentActions", "PostDeploymentActions", "{481F35BA-54E1-477E-92DC-D968876C34D4}"
30+
ProjectSection(SolutionItems) = preProject
31+
PostDeploymentActions\Readme.md = PostDeploymentActions\Readme.md
32+
PostDeploymentActions\RemoveAppOffline.ps1 = PostDeploymentActions\RemoveAppOffline.ps1
2533
EndProjectSection
2634
EndProject
2735
Global
File renamed without changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#$wwwrootPath = '../../../wwwroot'
2+
$wwwrootPath = 'wwwroot'
3+
$appOfflinePath = $wwwrootPath + '/app_offline.htm'
4+
$markerFilePath = $wwwrootPath + '/app_offline was last deployment.txt'
5+
6+
if (Test-Path -Path $markerFilePath)
7+
{
8+
Remove-Item -Path $markerFilePath
9+
Remove-Item -Path $appOfflinePath
10+
}
11+
elseif (Test-Path -Path $appOfflinePath)
12+
{
13+
New-Item -Path $markerFilePath -ItemType File -Force
14+
}

0 commit comments

Comments
 (0)