Enhance deploy-production.sh with error handling for git pull failures. Provide user guidance for SSH key setup and switching to HTTPS if necessary. Update code-analysis.yml to include Node.js setup with caching for improved workflow efficiency.
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 1m25s

This commit is contained in:
Torsten Schulz (local)
2026-04-15 21:09:04 +02:00
parent 2bedbee08d
commit c1de0c1671
2 changed files with 18 additions and 1 deletions

View File

@@ -12,6 +12,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Workspace sanity check
run: |
echo "PWD: $(pwd)"

View File

@@ -137,7 +137,18 @@ git clean -fd \
# Pull latest changes
echo " Pulling latest changes..."
git pull
if ! git pull --ff-only; then
echo "ERROR: git pull fehlgeschlagen."
echo ""
echo "Häufige Ursache: SSH-Key für den aktuellen User fehlt."
echo "Prüfen:"
echo " ssh -T git@tsschulz.de"
echo ""
echo "Optional auf HTTPS wechseln:"
echo " git remote set-url origin https://tsschulz.de/<owner>/<repo>.git"
echo "Oder SSH-Key für User $(id -un) hinterlegen."
exit 1
fi
# Reset any accidental changes from stash restore (should be none now)
git reset --hard HEAD >/dev/null 2>&1