From f233d8143040f2635e610d9e608161c875177156 Mon Sep 17 00:00:00 2001 From: Nolan King Date: Wed, 18 Feb 2026 19:40:21 -0700 Subject: [PATCH 1/2] add github actions workflow --- .github/workflows/mkmarkdown.yml | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/mkmarkdown.yml diff --git a/.github/workflows/mkmarkdown.yml b/.github/workflows/mkmarkdown.yml new file mode 100644 index 00000000..d75baab0 --- /dev/null +++ b/.github/workflows/mkmarkdown.yml @@ -0,0 +1,41 @@ +name: Regenerate Markdown from Source + +on: + push: + branches: [master] + paths: + - '*.txt' + - 'zguide.book' + - 'bin/mkmarkdown' + + workflow_dispatch: + +jobs: + mkmarkdown: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Run mkmarkdown + run: perl bin/mkmarkdown < zguide.book + + - name: Check for changes + id: diff + run: | + git diff --quiet site/content/ site/.bookmarks || echo "changed=true" >> "$GITHUB_OUTPUT" + + - name: Commit and push regenerated markdown + if: steps.diff.outputs.changed == 'true' + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add site/content/ site/.bookmarks + git commit -m "Regenerate markdown from source txt files" + git push From eb0a4af66150b346bc6ae667d6885ba3bf25bdca Mon Sep 17 00:00:00 2001 From: Nolan King Date: Wed, 18 Feb 2026 20:24:33 -0700 Subject: [PATCH 2/2] update workflow to skip site/.bookmarks --- .github/workflows/mkmarkdown.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mkmarkdown.yml b/.github/workflows/mkmarkdown.yml index d75baab0..15253537 100644 --- a/.github/workflows/mkmarkdown.yml +++ b/.github/workflows/mkmarkdown.yml @@ -29,13 +29,13 @@ jobs: - name: Check for changes id: diff run: | - git diff --quiet site/content/ site/.bookmarks || echo "changed=true" >> "$GITHUB_OUTPUT" + git diff --quiet site/content/ || echo "changed=true" >> "$GITHUB_OUTPUT" - name: Commit and push regenerated markdown if: steps.diff.outputs.changed == 'true' run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git add site/content/ site/.bookmarks + git add site/content/ git commit -m "Regenerate markdown from source txt files" git push