Add PSScriptAnalyzer & Docs workflow #8
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
name: Build documentation | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
update_docs: | |
runs-on: windows-latest | |
steps: | |
- name: 🚚 Check out repository | |
uses: actions/checkout@v2 | |
- name: Install and cache PowerShell modules | |
uses: potatoqualitee/[email protected] | |
with: | |
modules-to-cache-prerelease: platyPS:2.0.0-preview1 | |
- name: 📦 Update documentation | |
shell: pwsh | |
run: | | |
Import-Module platyPS -Force | |
Update-MarkdownHelpModule .\docs\ -AlphabeticParamsOrder -RefreshModulePage -UpdateInputOutput -ModulePagePath .\docs\index.md | |
- name: 📦 Commit and push changes | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
git add . | |
git commit -m "Update documentation" | |
git push |