Skip to content

Commit fb726ef

Browse files
committed
Remove SSH ControlMaster connection reuse settings from deploy scripts
1 parent 9dd253e commit fb726ef

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ jobs:
3737
HostName 104.36.23.197
3838
User ubuntu
3939
Port 2048
40-
ControlMaster auto
41-
ControlPath ~/.ssh/control-%C
42-
ControlPersist 30s
4340
EOF
4441
chmod 600 ~/.ssh/config
4542
@@ -98,7 +95,7 @@ jobs:
9895
./bin/deploy-with-migrations.sh
9996
10097
# Run test script to verify deployment
101-
ssh -p 2048 -o ControlMaster=auto -o ControlPath=~/.ssh/control-%C -o ControlPersist=30s [email protected] "cd $DEPLOY_REMOTE_DIR && chmod +x bin/test-github-actions.sh && ./bin/test-github-actions.sh"
98+
ssh -p 2048 [email protected] "cd $DEPLOY_REMOTE_DIR && chmod +x bin/test-github-actions.sh && ./bin/test-github-actions.sh"
10299
env:
103100
DEPLOY_REMOTE_HOST: 104.36.23.197
104101
DEPLOY_REMOTE_PORT: 2048

bin/deploy-with-migrations.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ REMOTE_PORT="${DEPLOY_REMOTE_PORT:-2048}"
2323
REMOTE_USER="${DEPLOY_REMOTE_USER:-ubuntu}"
2424
REMOTE_DIR="${DEPLOY_REMOTE_DIR:-www/profullstack.com/pdf}"
2525

26-
# Create SSH options with connection reuse
27-
SSH_OPTS="-p $REMOTE_PORT -o ControlMaster=auto -o ControlPath=~/.ssh/control-%C -o ControlPersist=30s"
26+
# Create SSH options
27+
SSH_OPTS="-p $REMOTE_PORT"
2828

2929
# Deploy the code first using deploy.sh
3030
echo -e "${YELLOW}Running deployment script...${NC}"

bin/deploy.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ REMOTE_DIR="${DEPLOY_REMOTE_DIR:-www/profullstack.com/pdf}"
1616
LOCAL_DIR="."
1717
INSTALL_SERVICE="${INSTALL_SERVICE:-false}"
1818

19-
# Create SSH options with connection reuse
20-
SSH_OPTS="-p $REMOTE_PORT -o ControlMaster=auto -o ControlPath=~/.ssh/control-%C -o ControlPersist=30s"
19+
# Create SSH options
20+
SSH_OPTS="-p $REMOTE_PORT"
2121
SCP_OPTS="-P $REMOTE_PORT"
22-
RSYNC_OPTS="-e \"ssh -p $REMOTE_PORT -o ControlMaster=auto -o ControlPath=~/.ssh/control-%C -o ControlPersist=30s\""
22+
RSYNC_OPTS="-e \"ssh -p $REMOTE_PORT\""
2323

2424
# Set colors for output
2525
GREEN='\033[0;32m'
@@ -42,10 +42,10 @@ if ssh $SSH_OPTS $REMOTE_USER@$REMOTE_HOST "[ -d $REMOTE_DIR ]"; then
4242
# Deploy using rsync with .deployignore
4343
if [ -f .deployignore ]; then
4444
echo -e "${YELLOW}Using .deployignore file for exclusions...${NC}"
45-
rsync -avz --partial --compress-level=9 --delete -e "ssh -p $REMOTE_PORT -o ControlMaster=auto -o ControlPath=~/.ssh/control-%C -o ControlPersist=30s" --exclude-from=.deployignore $LOCAL_DIR $REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR
45+
rsync -avz --partial --compress-level=9 --delete -e "ssh -p $REMOTE_PORT" --exclude-from=.deployignore $LOCAL_DIR $REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR
4646
else
4747
echo -e "${YELLOW}No .deployignore file found. Excluding node_modules/ by default...${NC}"
48-
rsync -avz --partial --compress-level=9 --delete -e "ssh -p $REMOTE_PORT -o ControlMaster=auto -o ControlPath=~/.ssh/control-%C -o ControlPersist=30s" --exclude="node_modules/" $LOCAL_DIR $REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR
48+
rsync -avz --partial --compress-level=9 --delete -e "ssh -p $REMOTE_PORT" --exclude="node_modules/" $LOCAL_DIR $REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR
4949
fi
5050

5151
# Check if rsync was successful

0 commit comments

Comments
 (0)