Added EPK
Deploy Hugo Site / deploy (push) Canceled after 0s

This commit is contained in:
lucashahmann committed 2026-10-19 22:23:47 +02:00
1 parent f98785b26a
commit 8cf5ed7b86
4 files changed
+457

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
# Erzeugt das EPK-PDF aus epk.html (Chrome oder Edge headless).
#
# .\epk\build.ps1
$ErrorActionPreference = "Stop"
Set-Location $PSScriptRoot
$browser = @(
"C:\Program Files\Google\Chrome\Application\chrome.exe",
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
) | Where-Object { Test-Path $_ } | Select-Object -First 1
if (-not $browser) { throw "Weder Chrome noch Edge gefunden." }
$html = (Resolve-Path "epk.html").Path
$pdf = Join-Path $PSScriptRoot "Deepwater_Survival_EPK.pdf"
if (Test-Path $pdf) { Remove-Item $pdf }
# Start-Process -Wait, weil chrome.exe sonst zurückkehrt, bevor das PDF geschrieben ist
Start-Process -FilePath $browser -Wait -WindowStyle Hidden -ArgumentList @(
"--headless=new", "--disable-gpu", "--no-pdf-header-footer",
"--allow-file-access-from-files", "--virtual-time-budget=5000",
"--print-to-pdf=`"$pdf`"", "`"file:///$($html -replace '\\','/')`""
)
if (-not (Test-Path $pdf)) { throw "PDF wurde nicht erzeugt." }
Write-Host "EPK erzeugt: $pdf"