Initial commit: Astro 6 static blog site
All checks were successful
Deploy / deploy (push) Successful in 49s
All checks were successful
Deploy / deploy (push) Successful in 49s
- German (default) and English i18n support - Categories and tags - Blog posts with hero images - Dark/light theme switcher - View Transitions removed to fix reload ghost images - Webmentions integration - RSS feeds per locale Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
commit
5bb63bacf5
95 changed files with 12199 additions and 0 deletions
58
scripts/publish-notes.sh
Executable file
58
scripts/publish-notes.sh
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
#!/usr/bin/env bash
|
||||
# Usage: publish-notes.sh [vps-host] [branch]
|
||||
# Can be called from any directory — no dependency on the repo being the working dir.
|
||||
set -euo pipefail
|
||||
|
||||
VAULT_NOTES='/Users/adrian/Obsidian/Web/adrian-altner-com/content/notes'
|
||||
VPS="${1:-hetzner}"
|
||||
REMOTE_BRANCH="${2:-main}"
|
||||
|
||||
REMOTE_BASE='/opt/websites/www.adrian-altner.de'
|
||||
REMOTE_NOTES="${REMOTE_BASE}/src/content/notes"
|
||||
|
||||
# --- 1. Sync vault to VPS ---
|
||||
ssh "$VPS" "
|
||||
set -euo pipefail
|
||||
cd '$REMOTE_BASE'
|
||||
git fetch --prune origin '$REMOTE_BRANCH'
|
||||
git checkout '$REMOTE_BRANCH'
|
||||
git reset --hard 'origin/$REMOTE_BRANCH'
|
||||
git clean -fd -e .env -e .env.production
|
||||
mkdir -p '$REMOTE_NOTES'
|
||||
"
|
||||
|
||||
rsync -az --delete \
|
||||
--include='*/' \
|
||||
--include='*.md' \
|
||||
--include='*.mdx' \
|
||||
--include='*.jpg' \
|
||||
--include='*.jpeg' \
|
||||
--include='*.JPG' \
|
||||
--include='*.JPEG' \
|
||||
--exclude='.DS_Store' \
|
||||
--exclude='*' \
|
||||
"$VAULT_NOTES/" "$VPS:$REMOTE_NOTES/"
|
||||
|
||||
# --- 2. Build + cleanup ---
|
||||
ssh "$VPS" "
|
||||
set -euo pipefail
|
||||
cd '$REMOTE_BASE'
|
||||
|
||||
podman-compose -f compose.yml up --build -d --force-recreate
|
||||
|
||||
podman image prune -af
|
||||
podman builder prune -af
|
||||
"
|
||||
|
||||
echo "Notes deploy done via $VPS (branch: $REMOTE_BRANCH)."
|
||||
|
||||
# --- 3. Webmentions ---
|
||||
WEBMENTION_APP_TOKEN="$(ssh "$VPS" "grep '^WEBMENTION_APP_TOKEN=' '$REMOTE_BASE/.env.production' | cut -d= -f2-" 2>/dev/null || true)"
|
||||
if [[ -n "$WEBMENTION_APP_TOKEN" ]]; then
|
||||
echo "Sending webmentions..."
|
||||
curl -s -X POST "https://webmention.app/check?url=https://adrian-altner.de/rss/notes.xml&token=${WEBMENTION_APP_TOKEN}" \
|
||||
| grep -o '"status":"[^"]*"' || true
|
||||
echo "Webmentions triggered."
|
||||
else
|
||||
echo "No WEBMENTION_APP_TOKEN in .env.production — skipping webmentions."
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue