feat: Add rsync filtering and optimize SFTP deployment process

- Introduced rsync support with customizable `rsyncArgs` for file filtering.
- Ensured only filtered content is uploaded, avoiding `filtered_upload` folder inclusion.
- Updated documentation to reflect the latest changes and usage examples.
This commit is contained in:
wl
2024-12-31 11:39:56 +08:00
parent 89e97d73f9
commit 896dcfc555
5 changed files with 169 additions and 84 deletions
+7 -4
View File
@@ -12,12 +12,15 @@ jobs:
- name: deploy file to server
uses: ./ # Uses an action in the root directory
with:
username: 'wl'
server: '${{ secrets.MAC_IP }}'
username: '${{ secrets.USER }}'
server: '${{ secrets.SERVER_IP }}'
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
local_path: './*'
remote_path: '/Users/wl/Downloads/t/a'
remote_path: '/tmp/testAction'
sftpArgs: '-o ConnectTimeout=5'
rsyncArgs: '--exclude *.yml'
# sftp_only: true
password: ${{secrets.SSH_PASSWORD}}
# password: ${{secrets.SSH_PASSWORD}}
# delete_remote_files: true