File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,6 +138,9 @@ jobs:
138138 $docsConfigContent = Get-Content -Path $docsConfigSourcePath -Raw
139139 $docsConfigContent = $docsConfigContent.Replace('-{{ REPO_NAME }}-', $ModuleName)
140140 $docsConfigContent = $docsConfigContent.Replace('-{{ REPO_OWNER }}-', $env:GITHUB_REPOSITORY_OWNER)
141+ if ($docsConfigFileName -eq 'zensical.toml' -and $docsConfigContent -notmatch '(?m)^\s*site_dir\s*=') {
142+ $docsConfigContent = $docsConfigContent -replace '(?m)^\[project\]\s*$', "[project]`nsite_dir = ""../../_site"""
143+ }
141144 $docsConfigContent | Set-Content -Path $docsConfigTargetPath -Force
142145
143146 Write-Host "Build Config Type: $docsConfigFileName"
@@ -159,7 +162,13 @@ jobs:
159162 }
160163
161164 LogGroup 'Build docs - Zensical build' {
162- zensical build --config-file $configFile --site-dir ../../_site
165+ zensical build --config-file $configFile
166+ }
167+
168+ LogGroup 'Build docs - verify output' {
169+ if (-not (Test-Path -Path '../../_site')) {
170+ throw "Expected Zensical output at ../../_site but it was not created."
171+ }
163172 }
164173
165174 - uses : actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
You can’t perform that action at this time.
0 commit comments