12
12
description : The path to the source code of the module.
13
13
required : false
14
14
default : src
15
- ModulesOutputPath :
16
- type : string
17
- description : The path to the output directory for the modules.
18
- required : false
19
- default : outputs/modules
20
- ModuleArtifactName :
21
- type : string
22
- description : Name of the module artifact to upload.
23
- required : false
24
- default : module
25
- DocsOutputPath :
26
- type : string
27
- description : The path to the output directory for the documentation.
28
- required : false
29
- default : outputs/docs
30
- DocsArtifactName :
31
- type : string
32
- description : Name of the docs artifact to upload.
33
- required : false
34
- default : docs
35
- SiteOutputPath :
36
- type : string
37
- description : The path to the output directory for the site.
38
- required : false
39
- default : outputs/site
40
15
Debug :
41
16
type : boolean
42
17
description : Enable debug output.
71
46
with :
72
47
fetch-depth : 0
73
48
74
- - name : Debug
75
- if : ${{ inputs.Debug }}
76
- uses : PSModule/Debug@v0
77
-
78
49
- name : Initialize environment
79
50
uses : PSModule/Initialize-PSModule@v1
80
51
with :
@@ -86,16 +57,14 @@ jobs:
86
57
- name : Download module artifact
87
58
uses : actions/download-artifact@v4
88
59
with :
89
- name : ${{ inputs.ModuleArtifactName }}
90
- path : ${{ inputs.ModulesOutputPath }}
60
+ name : module
61
+ path : outputs/module
91
62
92
63
- name : Document module
93
64
uses : PSModule/Document-PSModule@v1
94
65
with :
95
66
Name : ${{ inputs.Name }}
96
67
Path : ${{ inputs.Path }}
97
- ModulesOutputPath : ${{ inputs.ModulesOutputPath }}
98
- DocsOutputPath : ${{ inputs.DocsOutputPath }}
99
68
Debug : ${{ inputs.Debug }}
100
69
Prerelease : ${{ inputs.Prerelease }}
101
70
Verbose : ${{ inputs.Verbose }}
104
73
- name : Upload docs artifact
105
74
uses : actions/upload-artifact@v4
106
75
with :
107
- name : ${{ inputs.DocsArtifactName }}
108
- path : ${{ inputs.DocsOutputPath }}
76
+ name : docs
77
+ path : outputs/docs
109
78
if-no-files-found : error
110
79
retention-days : 1
111
80
130
99
- name : Lint documentation
131
100
uses : super-linter/super-linter/slim@latest
132
101
env :
133
- FILTER_REGEX_INCLUDE : ${{ inputs.DocsOutputPath }}
102
+ FILTER_REGEX_INCLUDE : outputs/docs
134
103
DEFAULT_BRANCH : main
135
104
DEFAULT_WORKSPACE : ${{ github.workspace }}
136
105
ENABLE_GITHUB_ACTIONS_GROUP_TITLE : true
@@ -161,11 +130,11 @@ jobs:
161
130
Verbose : ${{ inputs.Verbose }}
162
131
Version : ${{ inputs.Version }}
163
132
Script : |
164
- New-Item -Path "$env:GITHUB_WORKSPACE/${{ inputs.SiteOutputPath }} /docs/Functions" -ItemType Directory -Force
165
- Copy-Item -Path "$env:GITHUB_WORKSPACE/${{ inputs.DocsOutputPath }}/ *" -Destination "$env:GITHUB_WORKSPACE/${{ inputs.SiteOutputPath }} /docs/Functions" -Recurse -Force
133
+ New-Item -Path "$env:GITHUB_WORKSPACE/outputs/site /docs/Functions" -ItemType Directory -Force
134
+ Copy-Item -Path "$env:GITHUB_WORKSPACE/outputs/docs/ *" -Destination "$env:GITHUB_WORKSPACE/outputs/site /docs/Functions" -Recurse -Force
166
135
$moduleName = [string]::IsNullOrEmpty('${{ inputs.Name }}') ? $env:GITHUB_REPOSITORY_NAME : '${{ inputs.Name }}'
167
136
$ModuleSourcePath = Join-Path $PWD -ChildPath '${{ inputs.Path }}'
168
- $SiteOutputPath = Join-Path $PWD -ChildPath '${{ inputs.SiteOutputPath }} '
137
+ $SiteOutputPath = Join-Path $PWD -ChildPath 'outputs/site '
169
138
170
139
LogGroup "Get folder structure" {
171
140
Get-ChildItem -Recurse | Select-Object -ExpandProperty FullName | Sort-Object | Format-List
@@ -220,15 +189,15 @@ jobs:
220
189
Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse | Select-Object -ExpandProperty FullName | Sort-Object
221
190
222
191
- name : Build mkdocs-material project
223
- working-directory : ${{ inputs.SiteOutputPath }}
192
+ working-directory : outputs/site
224
193
shell : pwsh
225
194
run : |
226
195
LogGroup 'Build docs - mkdocs build - content' {
227
196
Show-FileContent -Path mkdocs.yml
228
197
}
229
198
230
199
LogGroup 'Build docs - mkdocs build' {
231
- mkdocs build --config-file mkdocs.yml --site-dir ${{ github.workspace }}/_site
200
+ mkdocs build --config-file mkdocs.yml --site-dir ${{ inputs.Path }}/_site
232
201
}
233
202
234
203
- uses : actions/upload-pages-artifact@v3
0 commit comments