Rename repo/image path to stan/website; retag legacy images on rollback
All checks were successful
Deploy production / deploy (push) Successful in 2m23s

This commit is contained in:
2026-10-23 22:53:23 +00:00
parent 45f2bbb198
commit 88837af624
5 changed files with 13 additions and 6 deletions

View File

@@ -16,8 +16,15 @@ origin=https://stanrunge.dev
environment=/etc/personal-website/prod.env
environment_name=production
image="git.stanrunge.dev/stan/personal-website:$sha"
image="git.stanrunge.dev/stan/website:$sha"
compose="$directory/compose.prod.yml"
# Images built before the repo rename (stan/personal-website -> stan/website) keep
# their old local name; retag so rollbacks to those SHAs still work.
legacy_image="git.stanrunge.dev/stan/personal-website:$sha"
if ! sudo docker image inspect "$image" >/dev/null 2>&1 &&
sudo docker image inspect "$legacy_image" >/dev/null 2>&1; then
sudo docker tag "$legacy_image" "$image"
fi
if ! sudo docker image inspect "$image" >/dev/null 2>&1; then
echo "Image $image is not on this host" >&2; exit 1
fi