From 6f057ad14a2a84c4f0d1c215b7fcb8060b99fb09 Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Thu, 23 Jul 2026 19:13:29 +0200 Subject: [PATCH] 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. --- .gitea/workflows/publish-docs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/publish-docs.yml b/.gitea/workflows/publish-docs.yml index f9ba3f6d..6aa1b400 100644 --- a/.gitea/workflows/publish-docs.yml +++ b/.gitea/workflows/publish-docs.yml @@ -117,6 +117,8 @@ jobs: git config user.email "actions@gitea.tourolle.paris" git checkout -q -b gitea-pages 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" git push -f "$REMOTE" gitea-pages