6 Commits

Author SHA1 Message Date
Tony
3db8d566e6 update dependencies
All checks were successful
Build and publish CMBA rulebooks (Gitea) / build-release (push) Successful in 10s
2026-01-14 10:29:08 -06:00
Tony
79ebe28ecc add github css
Some checks failed
Build and publish CMBA rulebooks (Gitea) / build-release (push) Failing after 10s
2026-01-14 10:27:19 -06:00
Tony
cdf3479260 fix curl
All checks were successful
Build and publish CMBA rulebooks (Gitea) / build-release (push) Successful in 1m6s
2026-01-14 10:05:14 -06:00
Tony
245c4ed28f think i fixed yaml
All checks were successful
Build and publish CMBA rulebooks (Gitea) / build-release (push) Successful in 1m27s
2026-01-14 10:01:22 -06:00
Tony
f78172f2af maybe fix curl issue 2026-01-14 09:50:03 -06:00
Tony
163af81f31 try new api url
All checks were successful
Build and publish CMBA rulebooks (Gitea) / build-release (push) Successful in 1m47s
2026-01-14 09:37:52 -06:00

View File

@@ -16,10 +16,12 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
# texlive-latex-recommended \
# texlive-fonts-recommended \
# texlive-latex-extra \
sudo apt-get install -y pandoc \
texlive-latex-recommended \
texlive-fonts-recommended \
texlive-latex-extra \
jq \
curl
@@ -27,6 +29,10 @@ jobs:
run: |
set -euo pipefail
mkdir -p dist
mkdir -p assets_tmp
curl -fsSL \
-o assets_tmp/github-markdown.css \
https://raw.githubusercontent.com/sindresorhus/github-markdown-css/main/github-markdown.css
for doc in cmba-bylaws; do
# Mobile-friendly HTML with TOC + serif styling
@@ -34,12 +40,13 @@ jobs:
--toc \
--standalone \
--metadata title="CMBA ${doc}" \
--css assets_tmp/github-markdown.css \
-o "dist/${doc}.html"
# PDF
pandoc "src/${doc}.md" \
--metadata title="CMBA ${doc}" \
-o "dist/${doc}.pdf"
# pandoc "src/${doc}.md" \
# --metadata title="CMBA ${doc}" \
# -o "dist/${doc}.pdf"
done
# Include source markdown for transparency
@@ -57,11 +64,12 @@ jobs:
OWNER="$(echo "$REPO" | cut -d/ -f1)"
NAME="$(echo "$REPO" | cut -d/ -f2)"
API="${GITEA_BASE_URL}/api/v1"
API="${GITHUB_API_URL}"
AUTH="Authorization: token ${GITEA_TOKEN}"
echo "Repo: $OWNER/$NAME"
echo "Tag: $TAG"
echo "API: $API"
# Check if release exists for this tag
existing_release_json="$(curl -sS -H "$AUTH" \
@@ -92,11 +100,8 @@ jobs:
curl -sS -X DELETE -H "$AUTH" \
"$API/repos/$OWNER/$NAME/releases/$RELEASE_ID/assets/$existing_asset_id" >/dev/null
fi
echo "Uploading: $filename"
curl -sS -X POST -H "$AUTH" \
-F "attachment=@$f" \
"$API/repos/$OWNER/$NAME/releases/$RELEASE_ID/assets" >/dev/null
echo "Uploading $filename"
curl -sS --fail -X POST -H "$AUTH" -H "Accept: application/json" -F "attachment=@$f" "$API/repos/$OWNER/$NAME/releases/$RELEASE_ID/assets?name=$filename" >/dev/null
done
echo "Done. Release page: ${GITEA_BASE_URL}/${OWNER}/${NAME}/releases/tag/${TAG}"