Synchronize files to the remote server using the rsync and SSH private key.
Required SSH login username.
Required remote server ip.
Required remote server SSH port, default 22.
Required login user SSH private key.
Required the source storage path of the synchronous files.
Required the destination storage path of the synchronous files.
ssh args. see more ssh -h
.
rsync args. see more rsync -h
.
Start time of synchronization.
End time of synchronization.
links: https://github.com/yeshan333/github-actions-test-repo
name: rsync-deploy-action tester
on:
push:
branches: [main]
jobs:
hello_world_rsync_deploy:
runs-on: ubuntu-latest
name: A job to test rsync-deploy-action
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Modify files permissions
run: |
chmod 777 -R ./sync_files
ls -l
- name: Tester
uses: yeshan333/rsync-deploy-action@main
id: rsync-deploy-action
with:
ssh_login_username: ${{ secrets.SSH_LOGIN_USERNAME }}
remote_server_ip: ${{ secrets.REMOTE_SERVER_IP }}
ssh_port: ${{ secrets.SSH_PORT }}
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
source_path: ./sync_files/*
destination_path: ~/shan333.cn