Skip to content

Commit c5c1559

Browse files
Simplify SFTP command in deploy workflow
1 parent 170a0df commit c5c1559

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,4 @@ jobs:
3636
PORT: ${{ secrets.SERVER_PORT }}
3737
TARGET: ${{ secrets.SERVER_TARGET_PATH }}
3838
run: |
39-
echo "lcd _site" > batch.sftp
40-
echo "cd $TARGET" >> batch.sftp
41-
echo "put -r *" >> batch.sftp
42-
43-
sshpass -p "$PASSWORD" sftp -P $PORT $USERNAME@$HOST < batch.sftp
39+
printf "lcd _site\ncd $TARGET\nput -r *\n" | sshpass -p "$PASSWORD" sftp -oBatchMode=no -P $PORT $USERNAME@$HOST

0 commit comments

Comments
 (0)