Skip to content

Fix deploy job: remove sudo from non-interactive SSH commands#8

Merged
ZBDat merged 2 commits into
mainfrom
copilot/fix-deploy-github-actions-job
Jun 16, 2026
Merged

Fix deploy job: remove sudo from non-interactive SSH commands#8
ZBDat merged 2 commits into
mainfrom
copilot/fix-deploy-github-actions-job

Conversation

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

The deploy job was failing because sudo in a non-interactive SSH session has no TTY to read a password from, causing an immediate exit.

Changes

  • .github/workflows/portfolio-ci-cd.yml: Replace sudo mkdir -p ... && sudo chown ... with a plain mkdir -p in the "Sync files to server" step
# Before
ssh -p "$TARGET_PORT" "$DEPLOY_USER@$TARGET_HOST" \
  "sudo mkdir -p '$DEPLOY_PATH' && sudo chown '$DEPLOY_USER':'$DEPLOY_USER' '$DEPLOY_PATH'"

# After
ssh -p "$TARGET_PORT" "$DEPLOY_USER@$TARGET_HOST" \
  "mkdir -p '$DEPLOY_PATH'"

mkdir -p is a no-op when the directory already exists, so this is safe for all subsequent deploys. Initial server setup requires a one-time admin step to create $DEPLOY_PATH and assign ownership to DEPLOY_USER.

Copilot AI changed the title [WIP] Fix failing GitHub Actions job deploy Fix deploy job: remove sudo from non-interactive SSH commands Jun 16, 2026
Copilot finished work on behalf of ZBDat June 16, 2026 09:35
Copilot AI requested a review from ZBDat June 16, 2026 09:35
Copilot finished work on behalf of ZBDat June 16, 2026 09:39
Copilot finished work on behalf of ZBDat June 16, 2026 09:41
Copilot finished work on behalf of ZBDat June 16, 2026 09:45
@ZBDat ZBDat marked this pull request as ready for review June 16, 2026 09:47
@ZBDat ZBDat merged commit d4fe142 into main Jun 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants