@@ -134,12 +134,20 @@ jobs:
134
134
Prerelease : ${{ inputs.Prerelease }}
135
135
Verbose : ${{ inputs.Verbose }}
136
136
Version : ${{ inputs.Version }}
137
+ WorkingDirectory : ${{ inputs.Path }}
137
138
Script : |
138
- $functionDocsFolder = New-Item -Path "${{ inputs.Path }}/outputs/site/docs/Functions" -ItemType Directory -Force
139
- Copy-Item -Path "${{ inputs.Path }}/outputs/docs/*" -Destination "${{ inputs.Path }}/outputs/site/docs/Functions" -Recurse -Force
140
- $moduleName = [string]::IsNullOrEmpty('${{ inputs.Name }}') ? $env:GITHUB_REPOSITORY_NAME : '${{ inputs.Name }}'
141
- $ModuleSourcePath = Join-Path $PWD -ChildPath '${{ inputs.Path }}'
142
- $SiteOutputPath = Join-Path $PWD -ChildPath 'outputs/site'
139
+ LogGroup "Get folder structure" {
140
+ $functionDocsFolder = New-Item -Path "/outputs/site/docs/Functions" -ItemType Directory -Force
141
+ Copy-Item -Path "/outputs/docs/*" -Destination "/outputs/site/docs/Functions" -Recurse -Force
142
+ $moduleName = [string]::IsNullOrEmpty('${{ inputs.Name }}') ? $env:GITHUB_REPOSITORY_NAME : '${{ inputs.Name }}'
143
+ $ModuleSourcePath = Resolve-Path 'src' | Select-Object -ExpandProperty Path
144
+ $SiteOutputPath = Resolve-Path 'outputs/site' | Select-Object -ExpandProperty Path
145
+
146
+ Write-Host "Function Docs Folder: $functionDocsFolder"
147
+ Write-Host "Module Name: $moduleName"
148
+ Write-Host "Module Source Path: $ModuleSourcePath"
149
+ Write-Host "Site Output Path: $SiteOutputPath"
150
+ }
143
151
144
152
LogGroup "Get folder structure" {
145
153
Get-ChildItem -Recurse | Select-Object -ExpandProperty FullName | Sort-Object | Format-List
@@ -158,28 +166,40 @@ jobs:
158
166
$aboutSourceFolder = Get-ChildItem -Path $ModuleSourcePath -Directory | Where-Object { $_.Name -eq 'en-US' }
159
167
Get-ChildItem -Path $aboutSourceFolder -Filter *.txt | Copy-Item -Destination $aboutDocsFolder -Force -Verbose -PassThru |
160
168
Rename-Item -NewName { $_.Name -replace '.txt', '.md' }
169
+
170
+ Write-Host "About Docs Folder: $aboutDocsFolder"
171
+ Write-Host "About Source Folder: $aboutSourceFolder"
161
172
}
162
173
163
174
LogGroup 'Build docs - Copy icon to assets' {
164
175
$assetsFolderPath = Join-Path -Path $SiteOutputPath -ChildPath 'docs/Assets'
165
176
$assetsFolder = New-Item -Path $assetsFolderPath -ItemType Directory -Force
166
177
$rootPath = Split-Path -Path $ModuleSourcePath -Parent
167
- $iconPath = Join -Path -Path $rootPath -ChildPath 'icon\icon.png'
178
+ $iconPath = Resolve -Path 'icon\icon.png' | Select-Object -ExpandProperty Path
168
179
Copy-Item -Path $iconPath -Destination $assetsFolder -Force -Verbose
180
+
181
+ Write-Host "Assets Folder: $assetsFolder"
182
+ Write-Host "Icon Path: $iconPath"
169
183
}
170
184
171
185
LogGroup 'Build docs - Copy readme.md' {
172
- $rootPath = Split-Path -Path $ModuleSourcePath -Parent
173
- $readmePath = Join-Path -Path $rootPath -ChildPath 'README.md'
186
+ $readmePath = Resolve-Path 'README.md' | Select-Object -ExpandProperty Path
174
187
$readmeTargetPath = Join-Path -Path $SiteOutputPath -ChildPath 'docs/README.md'
175
188
Copy-Item -Path $readmePath -Destination $readmeTargetPath -Force -Verbose
189
+
190
+ Write-Host "Readme Path: $readmePath"
191
+ Write-Host "Readme Target Path: $readmeTargetPath"
176
192
}
177
193
178
194
LogGroup 'Build docs - Create mkdocs.yml' {
179
195
$rootPath = Split-Path -Path $ModuleSourcePath -Parent
180
196
# This should be moved to an action so that we can use a default one, and not have to copy it from the repo.
181
197
$mkdocsSourcePath = Join-Path -Path $rootPath -ChildPath 'mkdocs.yml'
182
198
$mkdocsTargetPath = Join-Path -Path $SiteOutputPath -ChildPath 'mkdocs.yml'
199
+
200
+ Write-Host "Mkdocs Source Path: $mkdocsSourcePath"
201
+ Write-Host "Mkdocs Target Path: $mkdocsTargetPath"
202
+
183
203
$mkdocsContent = Get-Content -Path $mkdocsSourcePath -Raw
184
204
$mkdocsContent = $mkdocsContent.Replace('-{{ REPO_NAME }}-', $ModuleName)
185
205
$mkdocsContent = $mkdocsContent.Replace('-{{ REPO_OWNER }}-', $env:GITHUB_REPOSITORY_OWNER)
0 commit comments