Some checks failed
Host-Based Deploy (Java 21 Fix) / build-and-run (push) Failing after 1s
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: Host-Based Deploy (Java 21 Fix)
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build-and-run:
|
|
# WICHTIG: Hier nutzen wir das neue Host-Label
|
|
runs-on: pve-host
|
|
steps:
|
|
- name: Checkout Code
|
|
run: |
|
|
# Debug: Wer ist git.langhei.de?
|
|
cat /etc/hosts
|
|
ping -c 1 git.langhei.de || echo "Ping failed"
|
|
|
|
# Sicherstellen, dass wir im richtigen Verzeichnis sind
|
|
rm -rf ./* || true
|
|
|
|
# Versuch über die Domain
|
|
git clone http://git.langhei.de/Entwicklung/xxx-sphere-web.git . || \
|
|
# FALLBACK: Versuch über die IP direkt, falls DNS im Container hakt
|
|
git clone http://192.168.178.93:3000/Entwicklung/xxx-sphere-web.git .
|
|
|
|
git config --global http.sslVerify false
|
|
git checkout master
|
|
|
|
- name: Build Docker Image (Native Java 21)
|
|
run: |
|
|
chmod +x gradlew
|
|
# Da wir direkt auf dem Host sind, hat Java vollen Kernel-Zugriff
|
|
./gradlew bootBuildImage --imageName=xxx-sphere-web:latest
|
|
|
|
- name: Deploy Container
|
|
run: |
|
|
docker compose up -d --force-recreate
|