diff --git a/action.yml b/action.yml index e77ee55..c45349c 100644 --- a/action.yml +++ b/action.yml @@ -137,7 +137,6 @@ runs: case "$DT" in static) - docker rm -f "$SLUG" >/dev/null 2>&1 || true # in case it was previously a container deploy echo "::group::build (bun)" BH="build-${SLUG}-${SHA}" docker rm -f "$BH" >/dev/null 2>&1 || true @@ -163,6 +162,10 @@ runs: echo "::endgroup::" write_fragment "$(printf '%s {\n\troot * /srv/sites/%s\n\tfile_server\n\ttry_files {path} /index.html\n}\n' "$SITE_ADDR" "$DOMAIN")" + # Remove any prior container LAST — zero-downtime: a pre-existing + # container kept serving the domain (via its old fragment) all through + # the build above, until the file_server fragment took over just now. + docker rm -f "$SLUG" >/dev/null 2>&1 && echo " removed old container (switched to static)" || true ;; docker|docker-db)