This commit is contained in:
parent
01db90151a
commit
89113060ea
8 changed files with 37 additions and 68 deletions
|
|
@ -30,7 +30,8 @@ publishDate: $PUBLISH_DATE
|
||||||
description: ""
|
description: ""
|
||||||
cover: "./$SLUG.jpg"
|
cover: "./$SLUG.jpg"
|
||||||
coverAlt: ""
|
coverAlt: ""
|
||||||
tags: []
|
tags:
|
||||||
|
-
|
||||||
draft: false
|
draft: false
|
||||||
syndication:
|
syndication:
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@ cat > "$FILE" << EOF
|
||||||
title: "$TITLE"
|
title: "$TITLE"
|
||||||
publishDate: $PUBLISH_DATE
|
publishDate: $PUBLISH_DATE
|
||||||
description: ""
|
description: ""
|
||||||
tags: []
|
tags:
|
||||||
|
-
|
||||||
draft: false
|
draft: false
|
||||||
syndication:
|
syndication:
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,8 @@ publishDate: $PUBLISH_DATE
|
||||||
description: ""
|
description: ""
|
||||||
cover: "./$SLUG.jpg"
|
cover: "./$SLUG.jpg"
|
||||||
coverAlt: ""
|
coverAlt: ""
|
||||||
tags: []
|
tags:
|
||||||
|
-
|
||||||
draft: false
|
draft: false
|
||||||
syndication:
|
syndication:
|
||||||
---
|
---
|
||||||
|
|
@ -56,7 +57,8 @@ else
|
||||||
title: "$TITLE"
|
title: "$TITLE"
|
||||||
publishDate: $PUBLISH_DATE
|
publishDate: $PUBLISH_DATE
|
||||||
description: ""
|
description: ""
|
||||||
tags: []
|
tags:
|
||||||
|
-
|
||||||
draft: false
|
draft: false
|
||||||
syndication:
|
syndication:
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ cat > "$FILE" << EOF
|
||||||
title: "$TITLE"
|
title: "$TITLE"
|
||||||
description: ""
|
description: ""
|
||||||
publishDate: $PUBLISH_DATE
|
publishDate: $PUBLISH_DATE
|
||||||
tags: []
|
tags:
|
||||||
category: general
|
-
|
||||||
draft: true
|
draft: true
|
||||||
syndication:
|
syndication:
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@ cat > "$FILE" << EOF
|
||||||
title: "$TITLE"
|
title: "$TITLE"
|
||||||
description: ""
|
description: ""
|
||||||
publishDate: $PUBLISH_DATE
|
publishDate: $PUBLISH_DATE
|
||||||
tags: []
|
tags:
|
||||||
category: general
|
-
|
||||||
draft: true
|
draft: true
|
||||||
syndication:
|
syndication:
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
VAULT_BLOG='/Users/adrian/Obsidian/Web/adrian-altner-com/content/blog'
|
VAULT_CONTENT='/Users/adrian/Obsidian/Web/adrian-altner-com/content'
|
||||||
VAULT_PHOTOS='/Users/adrian/Obsidian/Web/adrian-altner-com/content/photos'
|
|
||||||
VPS="${1:-hetzner}"
|
VPS="${1:-hetzner}"
|
||||||
REMOTE_BRANCH="${2:-main}"
|
REMOTE_BRANCH="${2:-main}"
|
||||||
|
|
||||||
REMOTE_BASE='/opt/websites/www.adrian-altner.com'
|
REMOTE_BASE='/opt/websites/adrian-altner.com'
|
||||||
REMOTE_BLOG="${REMOTE_BASE}/src/content/blog"
|
REMOTE_CONTENT="${REMOTE_BASE}/src/content"
|
||||||
REMOTE_PHOTOS="${REMOTE_BASE}/src/content/photos"
|
|
||||||
|
|
||||||
# --- 1. Sync vault to VPS ---
|
# --- 1. Sync vault to VPS ---
|
||||||
ssh "$VPS" "
|
ssh "$VPS" "
|
||||||
|
|
@ -18,17 +16,9 @@ ssh "$VPS" "
|
||||||
git checkout '$REMOTE_BRANCH'
|
git checkout '$REMOTE_BRANCH'
|
||||||
git reset --hard 'origin/$REMOTE_BRANCH'
|
git reset --hard 'origin/$REMOTE_BRANCH'
|
||||||
git clean -fd -e .env -e .env.production
|
git clean -fd -e .env -e .env.production
|
||||||
mkdir -p '$REMOTE_BLOG'
|
mkdir -p '$REMOTE_CONTENT'
|
||||||
mkdir -p '$REMOTE_PHOTOS'
|
|
||||||
"
|
"
|
||||||
|
|
||||||
rsync -az --delete \
|
|
||||||
--include='*/' \
|
|
||||||
--include='*.md' \
|
|
||||||
--include='*.mdx' \
|
|
||||||
--exclude='*' \
|
|
||||||
"$VAULT_BLOG/" "$VPS:$REMOTE_BLOG/"
|
|
||||||
|
|
||||||
rsync -az --delete \
|
rsync -az --delete \
|
||||||
--include='*/' \
|
--include='*/' \
|
||||||
--include='*.md' \
|
--include='*.md' \
|
||||||
|
|
@ -40,15 +30,18 @@ rsync -az --delete \
|
||||||
--include='*.json' \
|
--include='*.json' \
|
||||||
--exclude='.DS_Store' \
|
--exclude='.DS_Store' \
|
||||||
--exclude='*' \
|
--exclude='*' \
|
||||||
"$VAULT_PHOTOS/" "$VPS:$REMOTE_PHOTOS/"
|
"$VAULT_CONTENT/" "$VPS:$REMOTE_CONTENT/"
|
||||||
|
|
||||||
# --- 2. Build + cleanup ---
|
# --- 2. Build + cleanup ---
|
||||||
ssh "$VPS" "
|
ssh "$VPS" "
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
cd '$REMOTE_BASE'
|
cd '$REMOTE_BASE'
|
||||||
podman-compose -f compose.yml up --build -d --force-recreate
|
sudo podman build -t localhost/adrian-altner.com:latest .
|
||||||
podman image prune -af
|
sudo systemctl restart podman-compose@adrian-altner.com.service
|
||||||
podman builder prune -af
|
sudo podman container prune -f 2>/dev/null || true
|
||||||
|
sudo podman image prune --external -f 2>/dev/null || true
|
||||||
|
sudo podman image prune -f 2>/dev/null || true
|
||||||
|
sudo podman builder prune -af 2>/dev/null || true
|
||||||
"
|
"
|
||||||
|
|
||||||
echo "Redeploy done via $VPS (branch: $REMOTE_BRANCH)."
|
echo "Redeploy done via $VPS (branch: $REMOTE_BRANCH)."
|
||||||
|
|
@ -64,4 +57,4 @@ if [[ -n "$WEBMENTION_APP_TOKEN" ]]; then
|
||||||
echo "Webmentions triggered."
|
echo "Webmentions triggered."
|
||||||
else
|
else
|
||||||
echo "No WEBMENTION_APP_TOKEN in .env.production — skipping webmentions."
|
echo "No WEBMENTION_APP_TOKEN in .env.production — skipping webmentions."
|
||||||
fi
|
fi
|
||||||
|
|
@ -45,7 +45,7 @@ ssh "$VPS" "
|
||||||
podman-compose -f compose.yml up --build -d --force-recreate
|
podman-compose -f compose.yml up --build -d --force-recreate
|
||||||
|
|
||||||
podman image prune -af
|
podman image prune -af
|
||||||
podman builder prune -af
|
podman builder prune -af || true
|
||||||
"
|
"
|
||||||
|
|
||||||
echo "Blog deploy done via $VPS (branch: $REMOTE_BRANCH)."
|
echo "Blog deploy done via $VPS (branch: $REMOTE_BRANCH)."
|
||||||
|
|
|
||||||
|
|
@ -43,55 +43,27 @@ const { dark } = Astro.props;
|
||||||
y2="6.5"></line>
|
y2="6.5"></line>
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://www.linkedin.com/in/adrian-altner/" aria-label="LinkedIn" target="_blank" rel="noopener noreferrer">
|
|
||||||
|
<a href="https://git.altner.cloud/adrian" aria-label="Forgejo" target="_blank" rel="noopener noreferrer">
|
||||||
<svg
|
<svg
|
||||||
width="18"
|
width="18"
|
||||||
height="18"
|
height="18"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 212 212"
|
||||||
fill="none"
|
fill="none"
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
stroke-width="2"
|
stroke-width="15"
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
>
|
>
|
||||||
<path
|
<g transform="translate(6,6)">
|
||||||
d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"
|
<path d="M58 168 v-98 a50 50 0 0 1 50-50 h20" stroke-width="25" />
|
||||||
></path><rect x="2" y="9" width="4" height="12"></rect><circle
|
<path d="M58 168 v-30 a50 50 0 0 1 50-50 h20" stroke-width="25" />
|
||||||
cx="4"
|
<circle cx="142" cy="20" r="18" />
|
||||||
cy="4"
|
<circle cx="142" cy="88" r="18" />
|
||||||
r="2"></circle>
|
<circle cx="58" cy="180" r="18" />
|
||||||
</svg>
|
</g>
|
||||||
</a>
|
|
||||||
<a href="https://codeberg.org/adrian-altner" aria-label="Codeberg" target="_blank" rel="noopener noreferrer">
|
|
||||||
<svg
|
|
||||||
width="18"
|
|
||||||
height="18"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="currentColor"
|
|
||||||
stroke="none"
|
|
||||||
aria-hidden="true"
|
|
||||||
>
|
|
||||||
<path d="M11.999.747A11.974 11.974 0 0 0 0 12.75c0 2.254.635 4.465 1.833 6.376L11.837 6.19c.072-.092.251-.092.323 0l4.178 5.402h-2.992l.065.239h3.113l.882 1.138h-3.674l.103.374h3.86l.777 1.003h-4.358l.135.483h4.593l.695.894h-5.038l.165.589h5.326l.609.785h-5.717l.182.65h6.038l.562.727h-6.397l.183.65h6.717A12.003 12.003 0 0 0 24 12.75 11.977 11.977 0 0 0 11.999.747zm3.654 19.104.182.65h5.326c.173-.204.353-.433.513-.65zm.385 1.377.18.65h3.563c.233-.198.485-.428.712-.65zm.383 1.377.182.648h1.203c.356-.204.685-.412 1.042-.648z"/>
|
|
||||||
</svg>
|
|
||||||
</a>
|
|
||||||
<a href="https://github.com/adrian-altner" aria-label="GitHub" target="_blank" rel="noopener noreferrer">
|
|
||||||
<svg
|
|
||||||
width="18"
|
|
||||||
height="18"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
aria-hidden="true"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"
|
|
||||||
></path>
|
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="/rss.xml" aria-label="RSS">
|
<a href="/rss.xml" aria-label="RSS">
|
||||||
<svg
|
<svg
|
||||||
width="18"
|
width="18"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue