Skip to content

Commit b75256c

Browse files
🌟 [Major]: Moved docs generation to Document-PSModule (#105)
## Description This pull request removes the functionality related to building and uploading module documentation, by removing the `Build-PSModuleDocumentation` function and the associated artifact upload step in the GitHub Actions workflow. This functionality is moved to [`Document-PSModule`](https://github.com/PSModule/Document-PSModule/) Removal of documentation build and upload: * [`scripts/helpers/Build/Build-PSModuleDocumentation.ps1`](diffhunk://#diff-dc95bfbd255c5bb79df192179e9cc5141ef230a8d82e80bc12fc6fefe6186fffL1-L110): Entire file deleted, removing the `Build-PSModuleDocumentation` function which was responsible for generating and fixing markdown documentation for the module. * [`scripts/helpers/Build-PSModule.ps1`](diffhunk://#diff-c688e346ad60fbe881bd05b6a5dbc1cd712fdca0bf8b8527965db583af825fd9L55): Removed the call to `Build-PSModuleDocumentation` from the `Build-PSModule` function. * [`action.yml`](diffhunk://#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6L74-L81): Removed the step that uploads the documentation artifact in the GitHub Actions workflow. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [x] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent 4a43798 commit b75256c

File tree

6 files changed

+2
-157
lines changed

6 files changed

+2
-157
lines changed

.github/workflows/Action-Test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ jobs:
3434
Name: PSModuleTest
3535
Path: tests/src
3636
ModulesOutputPath: tests/outputs/modules
37-
DocsOutputPath: tests/outputs/docs
3837

3938
ActionTestWithManifest:
4039
name: Action-Test - [DefaultWithManifest]
@@ -52,6 +51,4 @@ jobs:
5251
Name: PSModuleTest
5352
Path: tests/srcWithManifest
5453
ModulesOutputPath: tests/outputs/modules
55-
DocsOutputPath: tests/outputs/docs
5654
ModuleArtifactName: moduleWithManifest
57-
DocsArtifactName: docsWithManifest

README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ This step lets you add custom build logic to process or modify the module conten
2222
1. **Copies the source code** of the module to an output folder.
2323
1. **Builds the module manifest file** based on information from the GitHub repository and the source code. For more information, please read the [Module Manifest](#module-manifest) section.
2424
1. **Builds the root module (.psm1) file** by combining source code and adding automation into the root module file. For more information, please read the [Root module](#root-module) section.
25-
1. **Builds the module documentation** using platyPS and comment-based help in the source code. For more information, please read the [Module documentation](#module-documentation) section.
2625

2726
## Usage
2827

@@ -31,9 +30,7 @@ This step lets you add custom build logic to process or modify the module conten
3130
| `Name` | Name of the module to process. | `false` | |
3231
| `Path` | Path to the folder where the modules are located. | `false` | `src` |
3332
| `ModulesOutputPath` | Path to the folder where the built modules are outputted. | `false` | `outputs/modules` |
34-
| `DocsOutputPath` | Path to the folder where the built docs are outputted. | `false` | `outputs/docs` |
3533
| `ModuleArtifactName` | Name of the module artifact to upload. | `false` | `module` |
36-
| `DocsArtifactName` | Name of the docs artifact to upload. | `false` | `docs` |
3734
| `Debug` | Enable debug output. | `false` | `'false'` |
3835
| `Verbose` | Enable verbose output. | `false` | `'false'` |
3936
| `Version` | Specifies the version of the GitHub module to be installed. The value must be an exact version. | `false` | |
@@ -150,10 +147,6 @@ Linking the description to the module manifest file might show more how this wor
150147
}
151148
```
152149

153-
## Module documentation
154-
155-
The module documentation is built using `platyPS` and comment-based help in the source code. The documentation is currently not published anywhere but is expected to be published to GitHub Pages in a future release.
156-
157150
## Permissions
158151

159152
This action does not require any special permissions.
@@ -173,10 +166,3 @@ This action does not require any special permissions.
173166

174167
- [PowerShell scripting performance considerations](https://learn.microsoft.com/powershell/scripting/dev-cross-plat/performance/script-authoring-considerations)
175168
- [PowerShell module authoring considerations](https://learn.microsoft.com/powershell/scripting/dev-cross-plat/performance/module-authoring-considerations)
176-
177-
**Documentation:**
178-
179-
- [platyPS reference](https://learn.microsoft.com/powershell/module/platyps/?source=recommendations)
180-
- [PlatyPS overview](https://learn.microsoft.com/powershell/utility-modules/platyps/overview?view=ps-modules)
181-
- [about_Comment_Based_Help](https://go.microsoft.com/fwlink/?LinkID=123415)
182-
- [Supporting Updatable Help](https://learn.microsoft.com/powershell/scripting/developer/help/supporting-updatable-help)

action.yml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,10 @@ inputs:
1717
description: Path to the folder where the built modules are outputted.
1818
required: false
1919
default: outputs/modules
20-
DocsOutputPath:
21-
description: Path to the folder where the built docs are outputted.
22-
required: false
23-
default: outputs/docs
2420
ModuleArtifactName:
2521
description: Name of the module artifact to upload.
2622
required: false
2723
default: module
28-
DocsArtifactName:
29-
description: Name of the docs artifact to upload.
30-
required: false
31-
default: docs
3224
Debug:
3325
description: Enable debug output.
3426
required: false
@@ -54,15 +46,14 @@ runs:
5446
GITHUB_ACTION_INPUT_Name: ${{ inputs.Name }}
5547
GITHUB_ACTION_INPUT_Path: ${{ inputs.Path }}
5648
GITHUB_ACTION_INPUT_ModulesOutputPath: ${{ inputs.ModulesOutputPath }}
57-
GITHUB_ACTION_INPUT_DocsOutputPath: ${{ inputs.DocsOutputPath }}
5849
with:
5950
Debug: ${{ inputs.Debug }}
6051
Prerelease: ${{ inputs.Prerelease }}
6152
Verbose: ${{ inputs.Verbose }}
6253
Version: ${{ inputs.Version }}
6354
Script: |
6455
# Build-PSModule
65-
. "${{ github.action_path }}\scripts\main.ps1"
56+
${{ github.action_path }}\scripts\main.ps1
6657
6758
- name: Upload module artifact
6859
uses: actions/upload-artifact@v4
@@ -71,11 +62,3 @@ runs:
7162
path: ${{ inputs.ModulesOutputPath }}
7263
if-no-files-found: error
7364
retention-days: 1
74-
75-
- name: Upload docs artifact
76-
uses: actions/upload-artifact@v4
77-
with:
78-
name: ${{ inputs.DocsArtifactName }}
79-
path: ${{ inputs.DocsOutputPath }}
80-
if-no-files-found: error
81-
retention-days: 1

scripts/helpers/Build-PSModule.ps1

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ function Build-PSModule {
2525

2626
# Path to the folder where the built modules are outputted.
2727
[Parameter(Mandatory)]
28-
[string] $ModulesOutputFolderPath,
29-
30-
# Path to the folder where the documentation is outputted.
31-
[Parameter(Mandatory)]
32-
[string] $DocsOutputFolderPath
28+
[string] $ModulesOutputFolderPath
3329
)
3430

3531
LogGroup "Building module [$ModuleName]" {
@@ -43,16 +39,12 @@ function Build-PSModule {
4339

4440
$moduleOutputFolder = New-Item -Path $ModulesOutputFolderPath -Name $ModuleName -ItemType Directory -Force
4541
Write-Host "Module output folder: [$moduleOutputFolder]"
46-
47-
$docsOutputFolder = New-Item -Path $DocsOutputFolderPath -ItemType Directory -Force
48-
Write-Host "Docs output folder: [$docsOutputFolder]"
4942
}
5043

5144
Build-PSModuleBase -ModuleName $ModuleName -ModuleSourceFolder $moduleSourceFolder -ModuleOutputFolder $moduleOutputFolder
5245
Build-PSModuleManifest -ModuleName $ModuleName -ModuleOutputFolder $moduleOutputFolder
5346
Build-PSModuleRootModule -ModuleName $ModuleName -ModuleOutputFolder $moduleOutputFolder
5447
Update-PSModuleManifestAliasesToExport -ModuleName $ModuleName -ModuleOutputFolder $moduleOutputFolder
55-
Build-PSModuleDocumentation -ModuleName $ModuleName -ModuleSourceFolder $moduleSourceFolder -DocsOutputFolder $docsOutputFolder
5648

5749
LogGroup 'Build manifest file - Final Result' {
5850
$outputManifestPath = Join-Path -Path $ModuleOutputFolder -ChildPath "$ModuleName.psd1"

scripts/helpers/Build/Build-PSModuleDocumentation.ps1

Lines changed: 0 additions & 110 deletions
This file was deleted.

scripts/main.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ LogGroup 'Loading inputs' {
2626

2727
$modulesOutputFolderPath = Join-Path $env:GITHUB_WORKSPACE $env:GITHUB_ACTION_INPUT_ModulesOutputPath
2828
Write-Host "Modules output path: [$modulesOutputFolderPath]"
29-
$docsOutputFolderPath = Join-Path $env:GITHUB_WORKSPACE $env:GITHUB_ACTION_INPUT_DocsOutputPath
30-
Write-Host "Docs output path: [$docsOutputFolderPath]"
3129
}
3230

3331
LogGroup 'Build local scripts' {
@@ -47,7 +45,6 @@ $params = @{
4745
ModuleName = $moduleName
4846
ModuleSourceFolderPath = $moduleSourceFolderPath
4947
ModulesOutputFolderPath = $modulesOutputFolderPath
50-
DocsOutputFolderPath = $docsOutputFolderPath
5148
}
5249

5350
Build-PSModule @params

0 commit comments

Comments
 (0)