Files
fastapi-todolist/scripts/ci-deploy-entrypoint.sh
dengwenhao 2690088423
Deploy TodoList / deploy (push) Failing after 1m42s
Add Gitea Actions production deployment
2026-07-27 06:49:07 +00:00

24 lines
531 B
Bash
Executable File

#!/usr/bin/env bash
set -Eeuo pipefail
umask 077
EXPECTED_USER="scaiuser"
PROJECT_DIR="/home/scaiuser/dwh_apps/fastapi-todolist"
if [[ "$(id -un)" != "$EXPECTED_USER" ]]; then
echo "Error: deployment entrypoint must run as $EXPECTED_USER" >&2
exit 1
fi
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
if [[ ! -S "$XDG_RUNTIME_DIR/bus" ]]; then
echo "Error: user systemd bus is unavailable" >&2
exit 1
fi
cd "$PROJECT_DIR"
exec ./scripts/release.sh