Skip to content

Commit 4cc745e

Browse files
committed
header: show commit hash on preview deployments
1 parent ca59341 commit 4cc745e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/components/ui/header/Header.astro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import { icons } from "@/utils/icons";
1212
1313
const { t, localizeHref } = Astro.locals;
1414
15+
const isCoolifyPreview = import.meta.env.COOLIFY_PREVIEW;
16+
const sourceCommit = import.meta.env.SOURCE_COMMIT;
17+
1518
const navItems = navigationItems.map((item) => {
1619
const label = t(`common:header.nav.${item.translationKey}`);
1720
@@ -34,6 +37,10 @@ const navItems = navigationItems.map((item) => {
3437
};
3538
});
3639
---
40+
{isCoolifyPreview && sourceCommit && (
41+
<p style="padding: 4px;">
42+
commit {sourceCommit}
43+
</p>)}
3744

3845
<header class="header">
3946
<div class="header-inner">

0 commit comments

Comments
 (0)