diff --git a/.github/workflows/release-docs.yml b/.github/workflows/release-docs.yml
index 695e3bf..7e24230 100644
--- a/.github/workflows/release-docs.yml
+++ b/.github/workflows/release-docs.yml
@@ -24,44 +24,59 @@ jobs:
sudo apt-get install -y pandoc \
jq \
curl
- - name: Build pandoc after-body include (inline quote.js)
- shell: bash
+ - name: Build pandoc after-body include from .js files
run: |
+ set -euo pipefail
+
mkdir -p build
- {
- echo ''
- } > build/after-body.html
+ out="build/after-body.html"
+ : > "$out" # truncate
+ # Ensure deterministic order
+ shopt -s nullglob
+ files=(js/*.js)
+ if [ ${#files[@]} -eq 0 ]; then
+ echo "No JS files found in js/; generating empty after-body.html"
+ exit 0
+ fi
+
+ for f in "${files[@]}"; do
+ {
+ echo ""
+ } >> "$out"
+ done
- name: Build artifacts
run: |
set -euo pipefail
mkdir -p dist
-
- for doc in cmba-bylaws; do
+
+ docs=(*.md)
+
+ for doc in "${docs[@]}"; do
# Mobile-friendly HTML with TOC + serif styling
- pandoc "src/${doc}.md" \
+ pandoc "${doc}" \
--toc \
--standalone \
--number-sections \
--toc-depth=2 \
- --lua-filter src/shift-numbering.lua \
- --metadata-file src/metadata.yml \
+ --lua-filter pandoc-filters/shift-numbering.lua \
+ --metadata-file metadata.yml \
--embed-resources \
--metadata title="CMBA ${doc}" \
--include-after-body=build/after-body.html \
- --css src/style.css \
+ --css styles/style.css \
-o "dist/${doc}.html"
# PDF
- # pandoc "src/${doc}.md" \
+ # pandoc "${doc}" \
# --metadata title="CMBA ${doc}" \
# -o "dist/${doc}.pdf"
done
# Include source markdown for transparency
- cp src/${doc}.md dist/
+ cp ${doc}.md dist/
- name: Create or update Gitea Release and upload assets
env: