From 7e0daa5cbc770954c5f44c58fc08bddc3f89f36d Mon Sep 17 00:00:00 2001 From: ElementalCrisis <9443295+ElementalCrisis@users.noreply.github.com> Date: Sun, 6 Oct 2024 17:53:02 -0700 Subject: [PATCH] Update daily.yml --- .github/workflows/daily.yml | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 4669e13a..d944f2a4 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -40,30 +40,19 @@ jobs: shell: pwsh run: Compress-Archive .\\Shoko.Desktop\\bin\\Release .\\ShokoDesktop.zip - - name: Install PSFTP (SFTP Client) - run: | - Invoke-WebRequest -Uri "https://the.earth.li/~sgtatham/putty/latest/w64/psftp.exe" -OutFile "$env:TEMP\psftp.exe" - - - name: Upload Daily to shokoanime.com via SFTP + - name: Upload Daily to shokoanime.com via SFTP (OpenSSH) shell: pwsh env: FTP_USERNAME: ${{ secrets.FTP_USERNAME }} FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} FTP_SERVER: ${{ secrets.FTP_SERVER }} run: | - # Create an SFTP command script to upload the file - $sftp_script = @" - lcd $PWD + # Create an SSH pass file to provide the password + $password = ConvertTo-SecureString -AsPlainText $env:FTP_PASSWORD -Force + $credential = New-Object System.Management.Automation.PSCredential ($env:FTP_USERNAME, $password) + + # Disable host key checking and upload using OpenSSH's SFTP client + sftp -o StrictHostKeyChecking=no $env:FTP_USERNAME@$env:FTP_SERVER <