Skip to content

Commit a69daa5

Browse files
Document action scripts per MSX standard
Add comment-based help blocks and inline parameter documentation to new action PowerShell entry scripts to align with MSXOrg/docs script standards. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 9388dde commit a69daa5

4 files changed

Lines changed: 72 additions & 0 deletions

File tree

.github/actions/Build-ZensicalSite/src/main.ps1

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
11
#Requires -Version 7.0
22

3+
<#
4+
.SYNOPSIS
5+
Builds the Zensical site and normalizes output to the expected _site path.
6+
7+
.DESCRIPTION
8+
Runs zensical build from outputs/site and moves the generated _site directory
9+
to <WorkingDirectory>/_site for downstream workflow steps.
10+
11+
.EXAMPLE
12+
./main.ps1 -WorkingDirectory '.'
13+
14+
.INPUTS
15+
None.
16+
17+
.OUTPUTS
18+
None.
19+
#>
320
[CmdletBinding()]
421
param(
22+
# Build working directory containing outputs/site and destination _site.
523
[Parameter(Mandatory)]
624
[string]$WorkingDirectory
725
)

.github/actions/Inject-SiteScripts/src/main.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
11
#Requires -Version 7.0
22

3+
<#
4+
.SYNOPSIS
5+
Injects shared JavaScript snippets into generated site HTML files.
6+
7+
.DESCRIPTION
8+
Reads scripts from .github/scripts/site-injectors in the checked out workflow
9+
repository and injects each script into every HTML file under SitePath, once per file.
10+
11+
.EXAMPLE
12+
./main.ps1 -SitePath './_site' -WorkflowPath '_wf'
13+
14+
.INPUTS
15+
None.
16+
17+
.OUTPUTS
18+
None.
19+
#>
320
[CmdletBinding()]
421
param(
22+
# Path to generated site output directory containing HTML files.
523
[Parameter(Mandatory)]
624
[string]$SitePath,
725

26+
# Relative path to the checked out workflow repository root.
827
[Parameter(Mandatory)]
928
[string]$WorkflowPath
1029
)

.github/actions/Install-Zensical/src/main.ps1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#Requires -Version 7.0
22

3+
<#
4+
.SYNOPSIS
5+
Installs the Zensical CLI used by site build workflows.
6+
7+
.DESCRIPTION
8+
Installs the zensical Python package in the current runner environment.
9+
10+
.EXAMPLE
11+
./main.ps1
12+
13+
.INPUTS
14+
None.
15+
16+
.OUTPUTS
17+
None.
18+
#>
319
[CmdletBinding()]
420
param()
521

.github/actions/Structure-Site/src/main.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
11
#Requires -Version 7.0
22

3+
<#
4+
.SYNOPSIS
5+
Structures generated documentation content and writes a resolved site config.
6+
7+
.DESCRIPTION
8+
Copies generated docs, README, and assets into outputs/site and resolves zensical.toml
9+
placeholders and site_dir for build execution.
10+
11+
.EXAMPLE
12+
./main.ps1 -WorkingDirectory '.' -Name 'MyModule'
13+
14+
.INPUTS
15+
None.
16+
17+
.OUTPUTS
18+
None.
19+
#>
320
[CmdletBinding()]
421
param(
22+
# Build working directory where src/, README.md, and outputs/ exist.
523
[Parameter(Mandatory)]
624
[string]$WorkingDirectory,
725

26+
# Optional module name override used for placeholder replacement.
827
[Parameter()]
928
[string]$Name
1029
)

0 commit comments

Comments
 (0)