ci: fix Bad substitution in docs publish step

The gitea-pages push step used ${GITHUB_SHA::8}, a bash-only substring
expansion. The Gitea runner executes run: blocks with /bin/sh (dash),
which rejects it with "Bad substitution" and exits 2, failing the job
after the site had already built successfully.

Use cut(1) to shorten the SHA instead, which is POSIX sh compatible.
This commit is contained in:
2026-07-23 19:13:29 +02:00
parent bebe13eb62
commit 6f057ad14a
+3 -1
View File
@@ -117,6 +117,8 @@ jobs:
git config user.email "actions@gitea.tourolle.paris" git config user.email "actions@gitea.tourolle.paris"
git checkout -q -b gitea-pages git checkout -q -b gitea-pages
git add -A git add -A
git commit -q -m "docs: publish site from ${GITHUB_SHA::8}" # POSIX sh has no ${VAR::N} substring expansion — cut instead.
SHORT_SHA="$(printf '%s' "$GITHUB_SHA" | cut -c1-8)"
git commit -q -m "docs: publish site from ${SHORT_SHA}"
echo "🚀 Force-pushing to gitea-pages" echo "🚀 Force-pushing to gitea-pages"
git push -f "$REMOTE" gitea-pages git push -f "$REMOTE" gitea-pages