Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: docs
path: ${{ inputs.DocsOutputPath }}
path: '${{ inputs.SiteOutputPath }}/docs/Functions'

- name: Debug
uses: PSModule/Debug@v0
Expand All @@ -495,20 +495,11 @@ jobs:
uses: PSModule/GitHub-Script@v1
with:
Script: |
$ModuleName = '${{ inputs.Name }}'
$moduleName = [string]::IsNullOrEmpty('${{ inputs.Name }}') ? $env:GITHUB_REPOSITORY_NAME : '${{ inputs.Name }}'
$ModuleSourcePath = Join-Path $PWD -ChildPath '${{ inputs.Path }}'
$SiteOutputPath = Join-Path $PWD -ChildPath '${{ inputs.SiteOutputPath }}'

if (-not $ModuleName) {
$ModuleName = $env:GITHUB_REPOSITORY -replace '.+/'
}
Write-Verbose "Module name: $ModuleName"

$ModuleSourcePath = Join-Path (Get-Location) -ChildPath '${{ inputs.Path }}'
$DocsOutputPath = Join-Path (Get-Location) -ChildPath "${{ inputs.DocsOutputPath }}/$ModuleName"
$SiteOutputPath = Join-Path (Get-Location) -ChildPath '${{ inputs.SiteOutputPath }}'

$functionDocsFolderPath = Join-Path -Path $SiteOutputPath -ChildPath 'docs/Functions'
$functionDocsFolder = New-Item -Path $functionDocsFolderPath -ItemType Directory -Force
Get-ChildItem -Path $DocsOutputPath -Recurse -Force -Include '*.md' | Copy-Item -Destination $functionDocsFolder -Recurse -Force
$functionDocsFolder = Join-Path -Path $SiteOutputPath -ChildPath 'docs/Functions' | Get-Item
Get-ChildItem -Path $functionDocsFolder -Recurse -Force -Include '*.md' | ForEach-Object {
$fileName = $_.Name
$hash = (Get-FileHash -Path $_.FullName -Algorithm SHA256).Hash
Expand Down
30 changes: 7 additions & 23 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -502,17 +502,10 @@ jobs:
uses: actions/download-artifact@v4
with:
name: docs
path: ${{ inputs.DocsOutputPath }}
path: '${{ inputs.SiteOutputPath }}/docs/Functions'

- name: Debug File system
shell: pwsh
run: |
Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse | Select-Object -ExpandProperty FullName | Sort-Object

- name: Debug Env vars
shell: pwsh
run: |
Get-ChildItem env: | Format-Table
- name: Debug
uses: PSModule/Debug@v0

- uses: actions/configure-pages@v5

Expand All @@ -528,20 +521,11 @@ jobs:
uses: PSModule/GitHub-Script@v1
with:
Script: |
$ModuleName = '${{ inputs.Name }}'

if (-not $ModuleName) {
$ModuleName = $env:GITHUB_REPOSITORY -replace '.+/'
}
Write-Verbose "Module name: $ModuleName"

$ModuleSourcePath = Join-Path (Get-Location) -ChildPath '${{ inputs.Path }}'
$DocsOutputPath = Join-Path (Get-Location) -ChildPath "${{ inputs.DocsOutputPath }}/$ModuleName"
$SiteOutputPath = Join-Path (Get-Location) -ChildPath '${{ inputs.SiteOutputPath }}'
$moduleName = [string]::IsNullOrEmpty('${{ inputs.Name }}') ? $env:GITHUB_REPOSITORY_NAME : '${{ inputs.Name }}'
$ModuleSourcePath = Join-Path $PWD -ChildPath '${{ inputs.Path }}'
$SiteOutputPath = Join-Path $PWD -ChildPath '${{ inputs.SiteOutputPath }}'

$functionDocsFolderPath = Join-Path -Path $SiteOutputPath -ChildPath 'docs/Functions'
$functionDocsFolder = New-Item -Path $functionDocsFolderPath -ItemType Directory -Force
Copy-Item -Path $DocsOutputPath -Destination $functionDocsFolder -Recurse -Force
$functionDocsFolder = Join-Path -Path $SiteOutputPath -ChildPath 'docs/Functions' | Get-Item
Get-ChildItem -Path $functionDocsFolder -Recurse -Force -Include '*.md' | ForEach-Object {
$fileName = $_.Name
$hash = (Get-FileHash -Path $_.FullName -Algorithm SHA256).Hash
Expand Down