Copy files from github workstation to a proxy, then copy them from proxy to your online server
- name: Copy bin
uses: pranksteess/ssh-rsync-action@v2.0
with:
key: ${{ secrets.RSYNC_KEY }}
rsync_flags: ' -avzr --delete --progress '
dst_host: 1.1.1.1
dst_user: root
proxy_host: 2.2.2.2
proxy_user: root
src_file: xxx.bin
proxy_file_path: /tmp/proxy_file_save/
dst_file_path: /usr/local/service/xxx/bin/
ssh_after: |
cd /usr/local/service/xxx/bin/
md5sum xxx.new
mv xxx xxx.old
mv xxx.new xxx
supervisorctl restart xxx
more details see action.yml