fix(core): syntaxe
Some checks failed
Sync to mirror repository / sync (push) Failing after 8s
Publish content / push (push) Successful in 1m30s
Publish content / build (push) Successful in 2m16s
Publish content / deploy (push) Successful in 46s

This commit is contained in:
2025-11-02 18:38:58 +01:00
parent 9467cc95f8
commit 400e1d3cdd

View File

@@ -26,8 +26,18 @@ jobs:
MIRROR_URL: ${{ secrets.MIRROR_REPO_URL }}
MIRROR_TOKEN: ${{ secrets.MIRROR_REPO_TOKEN }}
run: |
# Build authenticated URL
if [[ "$MIRROR_URL" == http* ]]; then
# URL already contains protocol
AUTH_URL="${MIRROR_URL/https:\/\//https://$GIT_USER_NAME:$MIRROR_TOKEN@}"
AUTH_URL="${AUTH_URL/http:\/\//http://$GIT_USER_NAME:$MIRROR_TOKEN@}"
else
# URL without protocol
AUTH_URL="https://$GIT_USER_NAME:$MIRROR_TOKEN@$MIRROR_URL"
fi
# Add mirror remote with authentication
git remote add mirror https://$GIT_USER_NAME:$MIRROR_TOKEN@${MIRROR_URL#https://}
git remote add mirror "$AUTH_URL"
# Push to mirror
git push mirror main --force