Skip to content

Commit

Permalink
Experimental: wrapper code to generate PS and ARM template docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenAelterman committed Dec 27, 2024
1 parent 307a90d commit 9c1d437
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions scripts/PowerShell/Scripts/Invoke-Docs.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<#
.SYNOPSIS
Generates documentation for select PowerShell modules and ARM templates in this repo.
#>

#Requires -Modules platyPS, Az.Resources, PSDocs.Azure

# Generate markdown help for the AzSubscriptionManagement module using platyPS
try {
Import-Module platyPS
Import-Module ../Modules/AzSubscriptionManagement.psm1 -ErrorAction Continue

New-MarkDownHelp -Module AzSubscriptionManagement -OutputFolder ../Modules/docs -Force
}
finally {
Remove-Module AzSubscriptionManagement
Remove-Module platyPS
}

# Generate markdown help for the research hub module using PSDocs
try {
bicep build ../../../research-spoke/main.bicep
Invoke-PSDocument -Path ../../../research-spoke/ -OutputPath ./docs
}
finally {
Remove-Item -Path ../../../research-spoke/main.json -Force
Remove-Module PSDocs.Azure
}

# TODO: Generate docs for research hub template

0 comments on commit 9c1d437

Please sign in to comment.