21 lines
363 B
Bash
Executable File
21 lines
363 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
REPO_DIR="/opt/homelab"
|
|
|
|
echo "[1/5] Switching to repo..."
|
|
cd "$REPO_DIR"
|
|
|
|
echo "[2/5] Fetching changes..."
|
|
git fetch origin
|
|
|
|
echo "[3/5] Resetting to origin/main..."
|
|
git reset --hard origin/main
|
|
|
|
echo "[4/5] Cleaning untracked files..."
|
|
git clean -fd
|
|
|
|
echo "[5/5] Running deploy..."
|
|
./scripts/deploy_caddy.sh
|
|
|
|
echo "[Done]" |