From dcf4b27a7a674756f87a65459543ba47771fa1fd Mon Sep 17 00:00:00 2001 From: asandikci Date: Sat, 16 Nov 2024 00:24:36 +0300 Subject: [PATCH] Update .forgejo/workflows/build_and_test.yml --- .forgejo/workflows/build_and_test.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.forgejo/workflows/build_and_test.yml b/.forgejo/workflows/build_and_test.yml index 5b18ecb..835bf88 100644 --- a/.forgejo/workflows/build_and_test.yml +++ b/.forgejo/workflows/build_and_test.yml @@ -87,14 +87,12 @@ jobs: pwd cp -rfv ../web/_site . ls -la - - lftp -c "set sftp:auto-confirm yes; set sftp:connect-program \"ssh -a -x -o UserKnownHostsFile=/dev/null\"; open --user ${{ secrets.SFTP_USERNAME }} --password ${{ secrets.SFTP_PASSWORD }}sftp://${{ vars.SFTP_HOST }}; rm -r www/; mirror -R . www/; quit" - - - # echo '${{ secrets.SFTP_PASSWORD }}' > ~/.passwd - # chmod 0400 ~/.passwd - # sshpass -f ~/.passwd sftp -oBatchMode=no -o StrictHostKeyChecking=accept-new -b - ${{ secrets.SFTP_USERNAME }}@${{ vars.SFTP_HOST }} << ! - # rm www/* - # put -r . www/ - # bye - # ! \ No newline at end of file + + # CURRENTLY USING PURE STFP FOR AUTH ONLY + # TODO: CHANGE THIS + echo '${{ secrets.SFTP_PASSWORD }}' > ~/.passwd + chmod 0400 ~/.passwd + sshpass -f ~/.passwd sftp -oBatchMode=no -o StrictHostKeyChecking=accept-new -b - ${{ secrets.SFTP_USERNAME }}@${{ vars.SFTP_HOST }} << ! + bye + ! + lftp --user ${{ secrets.SFTP_USERNAME }} --password ${{ secrets.SFTP_PASSWORD }} sftp://${{ vars.SFTP_HOST }} -e "rm -r www/; mirror -R . www/" \ No newline at end of file