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 \ sudo apt-get install -y pandoc \
jq \ jq \
curl curl
- name: Build pandoc after-body include (inline quote.js) - name: Build pandoc after-body include from .js files
shell: bash
run: | run: |
mkdir -p build set -euo pipefail
{
echo '<script>'
cat src/quote.js
echo '</script>'
} > build/after-body.html
mkdir -p build
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 - name: Build artifacts
run: | run: |
set -euo pipefail set -euo pipefail
mkdir -p dist mkdir -p dist
for doc in cmba-bylaws; do docs=(*.md)
for doc in "${docs[@]}"; do
# Mobile-friendly HTML with TOC + serif styling # Mobile-friendly HTML with TOC + serif styling
pandoc "src/${doc}.md" \ pandoc "${doc}" \
--toc \ --toc \
--standalone \ --standalone \
--number-sections \ --number-sections \
--toc-depth=2 \ --toc-depth=2 \
--lua-filter src/shift-numbering.lua \ --lua-filter pandoc-filters/shift-numbering.lua \
--metadata-file src/metadata.yml \ --metadata-file metadata.yml \
--embed-resources \ --embed-resources \
--metadata title="CMBA ${doc}" \ --metadata title="CMBA ${doc}" \
--include-after-body=build/after-body.html \ --include-after-body=build/after-body.html \
--css src/style.css \ --css styles/style.css \
-o "dist/${doc}.html" -o "dist/${doc}.html"
# PDF # PDF
# pandoc "src/${doc}.md" \ # pandoc "${doc}" \
# --metadata title="CMBA ${doc}" \ # --metadata title="CMBA ${doc}" \
# -o "dist/${doc}.pdf" # -o "dist/${doc}.pdf"
done done
# Include source markdown for transparency # Include source markdown for transparency
cp src/${doc}.md dist/ cp ${doc}.md dist/
- name: Create or update Gitea Release and upload assets - name: Create or update Gitea Release and upload assets
env: env: