Files
test/packages/release/bin/deployBackend.sh
Benjamin Falch 2bc741fb78
Some checks failed
Mark Stale PRs / stale (push) Has been cancelled
adding monkeytype
2026-04-23 13:53:44 +02:00

21 lines
537 B
Bash
Executable File

#!/bin/bash
# Determine the directory of the script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Source the .env file from the parent directory of the script's directory
source "$SCRIPT_DIR/../.env"
echo "Running $BE_SCRIPT_PATH on $BE_HOST with user $BE_USER"
# Connect to SSH and execute remote script
ssh_output=$(ssh "$BE_USER@$BE_HOST" "$BE_SCRIPT_PATH")
# Capture the exit code of the SSH command
exit_code=$?
# Print the output
echo "$ssh_output"
# Forward the exit code of the remote script
exit $exit_code