diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3f572df..903bc93 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,11 +31,10 @@ jobs: - if: ${{ github.event_name == 'push' && success() }} name: deploy file to server - uses: wlixcc/SFTP-Deploy-Action@v1.2.4 - with: + uses: appleboy/scp-action@v0.1.7 + with: + host: ${{ secrets.SERVER_IP }} username: 'root' - server: '${{ secrets.SERVER_IP }}' - ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} # 引用之前创建好的secret - local_path: './public/*' - remote_path: "/home/www/htdocs/wangjunliang/FrontEnd-Engineering-Guide/" - sftp_only: false + key: ${{ secrets.SSH_PRIVATE_KEY }} + source: './public/*' + target: "/home/www/htdocs/wangjunliang/FrontEnd-Engineering-Guide/"