Skip to content

Commit 7042daa

Browse files
Merge branch 'main' into dependabot/github_actions/github-actions-e061d434e4
2 parents 5e2e634 + f04a481 commit 7042daa

30 files changed

Lines changed: 67 additions & 79 deletions

File tree

.github/actions/Build-PSModule/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ inputs:
99
OutputFolder:
1010
description: Path to the folder where the built module is outputted.
1111
required: false
12-
default: 'outputs/module'
12+
default: '.PSModule/module'
1313
Version:
1414
description: Module version to stamp into the manifest.
1515
required: true

.github/actions/Build-PSModule/src/helpers/Build/Build-PSModuleManifest.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
[Parameter(Mandatory)]
2929
[string] $ModuleName,
3030

31-
# Folder where the built modules are outputted. 'outputs/modules/MyModule'
31+
# Folder where the built module is outputted. '.PSModule/module/MyModule'
3232
[Parameter(Mandatory)]
3333
[System.IO.DirectoryInfo] $ModuleOutputFolder,
3434

.github/actions/Build-PSModule/src/helpers/Build/Build-PSModuleRootModule.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
[Parameter(Mandatory)]
4444
[string] $ModuleName,
4545

46-
# Folder where the built modules are outputted. 'outputs/modules/MyModule'
46+
# Folder where the built module is outputted. '.PSModule/module/MyModule'
4747
[Parameter(Mandatory)]
4848
[System.IO.DirectoryInfo] $ModuleOutputFolder
4949
)

.github/actions/Build-ZensicalSite/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Build-ZensicalSite
22

3-
Builds Zensical documentation site output and normalizes it to `<working-directory>/_site`.
3+
Builds Zensical documentation site output at `<working-directory>/.PSModule/site/_site`.
44

55
## Inputs
66

.github/actions/Build-ZensicalSite/src/build-zensical-site.ps1

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,17 @@ param(
66
$ErrorActionPreference = 'Stop'
77

88
$resolvedWorkingDirectory = Resolve-Path -Path $WorkingDirectory | Select-Object -ExpandProperty Path
9-
$siteWorkingDirectory = Join-Path -Path $resolvedWorkingDirectory -ChildPath 'outputs/site'
10-
$outputSitePath = Join-Path -Path $resolvedWorkingDirectory -ChildPath '_site'
9+
$siteWorkingDirectory = Join-Path -Path $resolvedWorkingDirectory -ChildPath '.PSModule/site'
10+
$outputSitePath = Join-Path -Path $siteWorkingDirectory -ChildPath '_site'
1111

1212
Set-Location -Path $siteWorkingDirectory
1313

1414
if (-not (Test-Path -Path 'zensical.toml')) {
15-
throw "No documentation config file found in outputs/site. Expected zensical.toml."
15+
throw "No documentation config file found in .PSModule/site. Expected zensical.toml."
1616
}
1717

1818
zensical build --config-file 'zensical.toml'
1919

20-
if (Test-Path -Path '_site') {
21-
if (Test-Path -Path $outputSitePath) {
22-
Remove-Item -Path $outputSitePath -Recurse -Force
23-
}
24-
Move-Item -Path '_site' -Destination $outputSitePath -Force
25-
}
26-
2720
if (-not (Test-Path -Path $outputSitePath)) {
2821
throw "Expected Zensical output at $outputSitePath but it was not created."
2922
}

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

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<#
44
.SYNOPSIS
5-
Builds the Zensical site and normalizes output to the expected _site path.
5+
Builds the Zensical site under the framework artifact directory.
66
77
.DESCRIPTION
8-
Runs zensical build from outputs/site and moves the generated _site directory
9-
to <WorkingDirectory>/_site for downstream workflow steps.
8+
Runs zensical build from .PSModule/site. The generated site remains at
9+
<WorkingDirectory>/.PSModule/site/_site for downstream workflow steps.
1010
1111
.EXAMPLE
1212
./main.ps1 -WorkingDirectory '.'
@@ -19,32 +19,25 @@
1919
#>
2020
[CmdletBinding()]
2121
param(
22-
# Build working directory containing outputs/site and destination _site.
22+
# Build working directory containing the Zensical project and output.
2323
[Parameter(Mandatory)]
2424
[string]$WorkingDirectory
2525
)
2626

2727
$ErrorActionPreference = 'Stop'
2828

2929
$resolvedWorkingDirectory = Resolve-Path -Path $WorkingDirectory | Select-Object -ExpandProperty Path
30-
$siteWorkingDirectory = Join-Path -Path $resolvedWorkingDirectory -ChildPath 'outputs/site'
31-
$outputSitePath = Join-Path -Path $resolvedWorkingDirectory -ChildPath '_site'
30+
$siteWorkingDirectory = Join-Path -Path $resolvedWorkingDirectory -ChildPath '.PSModule/site'
31+
$outputSitePath = Join-Path -Path $siteWorkingDirectory -ChildPath '_site'
3232

3333
Set-Location -Path $siteWorkingDirectory
3434

3535
if (-not (Test-Path -Path 'zensical.toml')) {
36-
throw "No documentation config file found in outputs/site. Expected zensical.toml."
36+
throw "No documentation config file found in .PSModule/site. Expected zensical.toml."
3737
}
3838

3939
zensical build --config-file 'zensical.toml'
4040

41-
if (Test-Path -Path '_site') {
42-
if (Test-Path -Path $outputSitePath) {
43-
Remove-Item -Path $outputSitePath -Recurse -Force
44-
}
45-
Move-Item -Path '_site' -Destination $outputSitePath -Force
46-
}
47-
4841
if (-not (Test-Path -Path $outputSitePath)) {
4942
throw "Expected Zensical output at $outputSitePath but it was not created."
5043
}

.github/actions/Document-PSModule/src/main.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Get-ChildItem -Path $path -Filter '*.ps1' -Recurse | Resolve-Path -Relative | Fo
4040
Write-Host '::group::Loading inputs'
4141
$env:GITHUB_REPOSITORY_NAME = $env:GITHUB_REPOSITORY -replace '.+/'
4242
$moduleSourceFolderPath = Resolve-Path -Path 'src' | Select-Object -ExpandProperty Path
43-
$modulesOutputFolderPath = Join-Path -Path . -ChildPath 'outputs/module'
44-
$docsOutputFolderPath = Join-Path -Path . -ChildPath 'outputs/docs'
43+
$modulesOutputFolderPath = Join-Path -Path . -ChildPath '.PSModule/module'
44+
$docsOutputFolderPath = Join-Path -Path . -ChildPath '.PSModule/docs'
4545

4646
$params = @{
4747
ModuleName = [string]::IsNullOrEmpty($Name) ? $env:GITHUB_REPOSITORY_NAME : $Name

.github/actions/Inject-SiteScripts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ Injects JavaScript snippets from `.github/scripts/site-injectors/*.js` into gene
1313
- name: Inject shared site scripts
1414
uses: ./_wf/.github/actions/Inject-SiteScripts
1515
with:
16-
SitePath: ./_site
16+
SitePath: ./.PSModule/site/_site
1717
WorkflowPath: _wf
1818
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
repository and injects each script into every HTML file under SitePath, once per file.
1010
1111
.EXAMPLE
12-
./main.ps1 -SitePath './_site' -WorkflowPath '_wf'
12+
./main.ps1 -SitePath './.PSModule/site/_site' -WorkflowPath '_wf'
1313
1414
.INPUTS
1515
None.

.github/actions/Publish-PSModule/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Publishes a pre-versioned PowerShell module artifact to the PowerShell Gallery.
77
| Name | Description | Required | Default |
88
| --- | --- | --- | --- |
99
| `Name` | Name of the module to publish. | No | Repository name |
10-
| `ModulePath` | Path containing the built `<Name>/` module directory. | No | `outputs/module` |
10+
| `ModulePath` | Path containing the built `<Name>/` module directory. | No | `.PSModule/module` |
1111
| `ArtifactName` | Name of the module artifact to download. | No | `module` |
1212
| `PSGALLERY_API_KEY` | PowerShell Gallery API key. | Yes | N/A |
1313
| `WhatIf` | Logs publishing operations without publishing the module. | No | `false` |
@@ -24,7 +24,7 @@ This action does not provide outputs.
2424
uses: ./.github/actions/Publish-PSModule
2525
with:
2626
Name: ExampleModule
27-
ModulePath: outputs/module
27+
ModulePath: .PSModule/module
2828
ArtifactName: module
2929
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
3030
```

0 commit comments

Comments
 (0)