Füge Playwright-Installation hinzu: Überprüfe und installiere den Chromium-Browser in den Deployment-Skripten
All checks were successful
Code Analysis and Production Deploy / analyze (push) Successful in 4m31s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Successful in 3m6s

This commit is contained in:
Torsten Schulz (local)
2026-09-04 14:46:14 +02:00
parent 63b5786e43
commit 4dca2af645
2 changed files with 26 additions and 0 deletions

View File

@@ -102,6 +102,18 @@ install_dependencies_if_needed() {
printf '%s\n' "$current_lock_hash" > "$lock_hash_file"
}
install_playwright_browser() {
if [ ! -d "node_modules/playwright" ]; then
echo " Playwright ist nicht installiert; Browser-Installation wird übersprungen"
return 0
fi
# Muss mit demselben Benutzer laufen, der später den PM2-Prozess startet;
# Playwright legt den Browser im benutzerspezifischen Cache ab.
echo " Installing/verifying Playwright Chromium browser..."
npx playwright install chromium
}
use_project_node() {
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
if [ -s "$NVM_DIR/nvm.sh" ]; then
@@ -278,6 +290,7 @@ echo "3. Installing dependencies..."
use_project_node
ensure_node_version
install_dependencies_if_needed
install_playwright_browser
# 4. Stop running apps before replacing build artifacts
echo ""

View File

@@ -115,6 +115,18 @@ install_dependencies_if_needed() {
printf '%s\n' "$current_lock_hash" > "$lock_hash_file"
}
install_playwright_browser() {
if [ ! -d "node_modules/playwright" ]; then
echo " Playwright ist nicht installiert; Browser-Installation wird übersprungen"
return 0
fi
# Muss mit demselben Benutzer laufen, der später den PM2-Prozess startet;
# Playwright legt den Browser im benutzerspezifischen Cache ab.
echo " Installing/verifying Playwright Chromium browser..."
npx playwright install chromium
}
use_project_node() {
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
if [ -s "$NVM_DIR/nvm.sh" ]; then
@@ -284,6 +296,7 @@ echo "3. Installing dependencies..."
use_project_node
ensure_node_version
install_dependencies_if_needed
install_playwright_browser
# 4. Stop running app before replacing build artifacts
echo ""