-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With this commit the build pipeline will handle processing of the PowerShell scripts, writing Markdown help from them. It will then call on mkdocs in the pipeline to create a new version of the docs.
- Loading branch information
1 parent
c8a6ba9
commit 7908e3c
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,18 @@ param( | |
[Switch] | ||
$DeployToGallery, | ||
|
||
[Parameter()] | ||
[Switch] | ||
$WriteMdDocs, | ||
|
||
[Parameter()] | ||
[Switch] | ||
$MkDocsPublish, | ||
|
||
[Parameter()] | ||
[Switch] | ||
$GHPages, | ||
|
||
[Parameter()] | ||
[Switch] | ||
$Choco, | ||
|
@@ -92,5 +104,40 @@ process { | |
choco push $_.FullName -s https://push.chocolatey.org --api-key="'$($env:ChocoApiKey)'" | ||
} | ||
} | ||
|
||
$WriteMdDocs { | ||
if (Test-Path $root\Output\BeautifulDocs) { | ||
if ($env:PSModulePath.Split(';') -notcontains "$root\Output") { | ||
$env:PSModulePath = "$root\Output;$env:PSModulePath" | ||
} | ||
Import-Module BeautifulDocs -Force | ||
Import-Module PlatyPS -Force | ||
|
||
New-MarkdownHelp -Module BeautifulDocs -OutputFolder $root\docs | ||
|
||
} | ||
} | ||
|
||
$MkDocsPublish { | ||
$mkDocsRoot = Join-Path $root 'mkdocs_template' | ||
Push-Location $mkDocsRoot | ||
$mkDocsArgs = @('build') | ||
|
||
& 'C:\Python39\Scripts\mkdocs.exe' @mkDocsArgs | ||
} | ||
|
||
$GHPages { | ||
# Write your PowerShell commands here. | ||
git config --global user.name 'Stephen Valdinger' | ||
git config --global user.email '[email protected]' | ||
git remote rm origin | ||
$url = 'https://steviecoaster:' + $env:GH_TOKEN + '@github.com/steviecoaster/BeautifulDocs.git' | ||
git remote add origin $url | ||
|
||
$mkDocsArgs = @('gh-deploy','--force') | ||
|
||
Set-Location .\mkdocs_template | ||
& 'C:\Python39\Scripts\mkdocs.exe' @mkDocsArgs | ||
} | ||
} | ||
} |