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
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 1m25s
This commit is contained in:
@@ -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)"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user