Skip to content

Commit

Permalink
Merge pull request #113 from MusicDin/fix/image-sftp
Browse files Browse the repository at this point in the history
Use SFTP instead of SCP to upload images
  • Loading branch information
tomponline authored Mar 25, 2024
2 parents 3c79fed + 0a5fd1a commit a05f790
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/actions/image-upload/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ runs:
# Move image content.
mv ${SRC_DIR}/* "${PRODUCT_PATH}/${VERSION}"
# s -> Uses SFTP protocol
# r -> Copies files recursively
# p -> Preserves modification and access times
scp -srp -P ${SSH_PORT} ${SRC_DIR}-upload/* "${SSH_USER}@${SSH_HOST}:"
# Use SFTP to upload images to the server.
sftp -P ${SSH_PORT} "${SSH_USER}@${SSH_HOST}" <<EOF
put -r ${SRC_DIR}-upload/*
bye
EOF

0 comments on commit a05f790

Please sign in to comment.