1

Initial commit

This commit is contained in:
2025-03-28 12:57:37 +01:00
commit ed9ddcfdc8
1841 changed files with 42303 additions and 0 deletions

24
deploy.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
set -euo pipefail
# Configuration
DEST_USER="root"
DEST_HOST="server-main.home.arpa"
DEST_DIR="/var/lib/www/richard.dern.ovh/"
HUGO_ENV="production"
TARGET_OWNER="caddy:caddy"
echo "==> Génération du site Hugo pour l'environnement $HUGO_ENV (avec nettoyage de destination)"
hugo --environment "$HUGO_ENV" --cleanDestinationDir
echo "==> Synchronisation du site vers le serveur $DEST_HOST"
rsync -avz --delete \
--exclude='*/data/' \
--no-owner --no-group \
--checksum \
public/ "$DEST_USER@$DEST_HOST:$DEST_DIR"
echo "==> Correction des droits sur le serveur"
ssh "$DEST_USER@$DEST_HOST" "chown -R $TARGET_OWNER '$DEST_DIR'"
echo "==> Déploiement terminé avec succès."