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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user