Files
egbim_homepage/scripts/deploy_remote.sh
T
2026-07-23 16:15:57 +09:00

18 lines
363 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
branch="${1:-main}"
target_dir="${2:-/srv/egbim_homepage}"
mkdir -p "$target_dir"
cd "$target_dir"
if [[ ! -d .git ]]; then
git clone --branch "$branch" https://gitea.hmac.kr/b24014/egbim_homepage.git .
else
git fetch origin
git checkout "$branch"
git reset --hard "origin/$branch"
fi
docker compose up -d --build