File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -189,8 +189,25 @@ jobs:
189
189
190
190
LogGroup 'Build docs - Create mkdocs.yml' {
191
191
$rootPath = Split-Path -Path $ModuleSourcePath -Parent
192
- # This should be moved to an action so that we can use a default one, and not have to copy it from the repo.
193
- $mkdocsSourcePath = Join-Path -Path $rootPath -ChildPath 'mkdocs.yml'
192
+ $possiblePaths = @(
193
+ '.github/mkdocs.yml',
194
+ 'docs/mkdocs.yml',
195
+ 'mkdocs.yml'
196
+ )
197
+
198
+ $mkdocsSourcePath = $null
199
+ foreach ($path in $possiblePaths) {
200
+ $candidatePath = Join-Path -Path $rootPath -ChildPath $path
201
+ if (Test-Path -Path $candidatePath) {
202
+ $mkdocsSourcePath = $candidatePath
203
+ break
204
+ }
205
+ }
206
+
207
+ if (-not $mkdocsSourcePath) {
208
+ throw "Mkdocs source file not found in any of the expected locations: $($possiblePaths -join ', ')"
209
+ }
210
+
194
211
$mkdocsTargetPath = Join-Path -Path $SiteOutputPath -ChildPath 'mkdocs.yml'
195
212
196
213
Write-Host "Mkdocs Source Path: $mkdocsSourcePath"
You can’t perform that action at this time.
0 commit comments