update workflow for new structure
Some checks failed
Build and publish CMBA rulebooks (Gitea) / build-release (push) Failing after 18s

This commit is contained in:
Tony
2026-01-15 11:06:13 -06:00
parent d089951f60
commit 4051e27a53

View File

@@ -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 '<script>'
cat src/quote.js
echo '</script>'
} > 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 "<script>"
echo "$f"
echo "</script>"
} >> "$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: