Skip to content

Commit 2c0a967

Browse files
Refactor action.yml and Build-PSModuleDocumentation.ps1 to streamline execution and improve module import process
1 parent 87bc22e commit 2c0a967

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

action.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ runs:
3737
env:
3838
GITHUB_ACTION_INPUT_Name: ${{ inputs.Name }}
3939
GITHUB_ACTION_INPUT_Path: ${{ inputs.Path }}
40-
with:
41-
Debug: ${{ inputs.Debug }}
42-
Prerelease: ${{ inputs.Prerelease }}
43-
Verbose: ${{ inputs.Verbose }}
44-
Version: ${{ inputs.Version }}
45-
Script: |
46-
# Build-PSModuleDocumentation
47-
${{ github.action_path }}\scripts\main.ps1
40+
shell: pwsh
41+
run: |
42+
# Build-PSModuleDocumentation
43+
${{ github.action_path }}\scripts\main.ps1

scripts/helpers/Build-PSModuleDocumentation.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
Write-Host '::group::Build docs - Generate markdown help'
4848
Add-PSModulePath -Path (Split-Path -Path $ModuleOutputFolder -Parent)
49-
Import-PSModule -Path $ModuleOutputFolder -ModuleName $ModuleName
49+
Import-PSModule -Path $ModuleOutputFolder
5050
Write-Host ($ModuleName | Get-Module)
5151
$null = New-MarkdownHelp -Module $ModuleName -OutputFolder $DocsOutputFolder -Force -Verbose
5252
Get-ChildItem -Path $DocsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object {

0 commit comments

Comments
 (0)