File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6262 draft : false
6363 prerelease : ${{ github.ref != 'refs/heads/main' }}
6464
65+ - name : Write MD Docs with PlatyPS
66+ run : .\build.ps1 -WriteMdDocs -SemVer "${{ steps.gitversion.outputs.LegacySemVerPadded }}"
67+ shell : pwsh
68+
69+ - name : Deploy docs
70+ uses : mhausenblas/mkdocs-deploy-gh-pages@nomaterial
71+ # Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
72+ env :
73+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
74+ CONFIG_FILE : .\mkdocs_template\mkdocs.yml
75+ EXTRA_PACKAGES : build-base
76+ # GITHUB_DOMAIN: github.myenterprise.com
77+
6578 - name : Publish Module
6679 if : ${{ github.ref == 'refs/heads/main' }}
6780 run : .\build.ps1 -DeployToGallery -SemVer "${{ steps.gitversion.outputs.LegacySemVerPadded }}"
Original file line number Diff line number Diff line change @@ -92,5 +92,40 @@ process {
9292 choco push $_.FullName - s https:// push.chocolatey.org -- api- key= " '$ ( $env: ChocoApiKey ) '"
9393 }
9494 }
95+
96+ $WriteMdDocs {
97+ if (Test-Path $root \Output\BeautifulDocs) {
98+ if ($env: PSModulePath.Split (' ;' ) -notcontains " $root \Output" ) {
99+ $env: PSModulePath = " $root \Output;$env: PSModulePath "
100+ }
101+ Import-Module BeautifulDocs - Force
102+ Import-Module PlatyPS - Force
103+
104+ New-MarkdownHelp - Module BeautifulDocs - OutputFolder $root \docs
105+
106+ }
107+ }
108+
109+ $MkDocsPublish {
110+ $mkDocsRoot = Join-Path $root ' mkdocs_template'
111+ Push-Location $mkDocsRoot
112+ $mkDocsArgs = @ (' build' )
113+
114+ & ' C:\Python39\Scripts\mkdocs.exe' @mkDocsArgs
115+ }
116+
117+ $GHPages {
118+ # Write your PowerShell commands here.
119+ git config -- global user.name ' Stephen Valdinger'
120+ git config -- global user.email ' stephen@chocolatey.io'
121+ git remote rm origin
122+ $url = ' https://steviecoaster:' + $env: GH_TOKEN + ' @github.com/steviecoaster/BeautifulDocs.git'
123+ git remote add origin $url
124+
125+ $mkDocsArgs = @ (' gh-deploy' , ' --force' )
126+
127+ Set-Location .\mkdocs_template
128+ & ' C:\Python39\Scripts\mkdocs.exe' @mkDocsArgs
129+ }
95130 }
96131}
You can’t perform that action at this time.
0 commit comments