From 814c071286de12f491a6c8da7dd31120140c3952 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Sun, 23 Oct 2022 19:32:35 -0700 Subject: [PATCH] Add documentation CI --- .github/workflows/make-docs.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/make-docs.yml diff --git a/.github/workflows/make-docs.yml b/.github/workflows/make-docs.yml new file mode 100644 index 0000000..99ff5e9 --- /dev/null +++ b/.github/workflows/make-docs.yml @@ -0,0 +1,33 @@ +name: Documentation CI + +on: + push: + branches: + - main + paths: + - "ArdisUtilities/ArdisUtilities.psd1" + - "ArdisUtilities/ArdisUtilities.psm1" + - ".github/workflows/make-docs.yml" + +jobs: + make-docs: + runs-on: windows-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Build README.md + shell: pwsh + run: | + Import-Module ./ArdisUtilities/ -Force + Get-Command -Module ArdisUtilities | Get-HelpAsMarkdown | Out-File -FilePath ./README.md + + - name: Push README.md to the orphan docs branch + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + git checkout --orphan docs + git reset + git add -f README.md + git commit -m "Build README.md" + git push -f --set-upstream origin docs -- 2.47.3