fix: handle build_webpages returning None in WebsiteDeployer

Exception in _build_webpages was silently caught, returning None.
rsync then received "None/" as source path, silently breaking deploy.
This commit is contained in:
Alex V.
2026-02-07 16:29:14 +03:00
parent a5dc1d886d
commit 3ad8e5a6ee

View File

@@ -264,6 +264,9 @@ class WebsiteDeployer(Deployer):
# if www_folder is a hugo page, build it
if build_dir:
www_path = build_webpages(src_dir, build_dir, self.config)
if www_path is None:
logger.warning("Web page build failed, skipping website deployment")
return
# if it is not a hugo page, upload it as is
files.rsync(
f"{www_path}/", "/var/www/html", flags=["-avz", "--chown=www-data"]