Skip to content

Publish Wiki

Publish Wiki #25

Workflow file for this run

# File: .github/workflows/wiki.yml
on:
release:
types:
- "published"
workflow_dispatch:
name: Publish Wiki
permissions:
contents: write
pull-requests: write
jobs:
build-publish-wiki:
runs-on: ubuntu-22.04
steps:
- name: Checkout PSRule.Rules.AzureDevOps
uses: actions/checkout@v3
with:
path: main
- name: Checkout Wiki
uses: actions/checkout@v3
with:
repository: ${{github.repository}}.wiki
path: wiki
- name: Copy wiki base sources
shell: bash
run: |
rm -f ./wiki/*.md
rm -f ./wiki/rules/*.md
# Copy wiki base page
cp ./main/README.md ./wiki/Home.md
# Copy wiki rules
cp ./main/src/PSRule.Rules.AzureDevOps/en/*.md ./wiki/rules
# Copy docs
cp ./main/docs/*.md ./wiki
- name: Generate Module docs
shell: pwsh
run: |
Install-Module PSRule -Scope CurrentUser -Force
Import-Module PSRule
New-Item -Path ./wiki -Name commands -ItemType Directory -Force
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module Az.Resources
Install-Module PlatyPS
Import-Module PlatyPS
Import-Module ./main/src/PSRule.Rules.AzureDevOps
New-MarkdownHelp -Module PSRule.Rules.AzureDevOps `
-Verbose `
-Force `
-NoMetadata `
-OutputFolder ./wiki/commands
- name: Commit and push changes to wiki
shell: bash
working-directory: ./wiki
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "generated docs from actions workflow"
git push