This action uses rsync to sync files (probably) generated by a previous step in the workflow with a remote server.
Required SSH Key to be used during the rsync operation.
Required Flags to pass to rsync. Default -avzr --delete
.
Required Rsync options. i.e. --exclude
.
Required SSH command options. i.e. -p 2222
.
Required Local path to be synced. i.e. public/
.
Required Remote server and path. i.e [email protected]:/var/www/server.com/
.
Friendly status of the rsync command.
This example syncs the local folder public with the /var/www/server.com folder on the remote server server.com.
Add the a workflow file in your repository: .github/workflows/rsync.yml
.
- name: Deploy to server
id: deploy
uses: Pendect/[email protected]
env:
DEPLOY_KEY: ${{secrets.DEPLOY_KEY}}
with:
flags: '-avzr --delete'
options: ''
ssh_options: ''
src: 'public/'
dest: '[email protected]:/var/www/server.com'
- name: Display status from deploy
run: echo "${{ steps.deploy.outputs.status }}"
This example deals with a server listening to ssh on a port other than 22.
Using a rsync workflow file: .github/workflows/rsync.yml
, we modify the ssh_options input to have the -p 2222 option:
- name: Deploy to server
id: deploy
uses: Pendect/[email protected]
env:
DEPLOY_KEY: ${{secrets.DEPLOY_KEY}}
with:
flags: '-avzr --delete'
options: ''
ssh_options: '-p 2222'
src: 'public/'
dest: '[email protected]:/var/www/server.com'
- name: Display status from deploy
run: echo "${{ steps.deploy.outputs.status }}"
- Add support to distinct remote port [ericof]
- Initial release of Pendect/action-rsyncer [ericof]
Pendect is reshaping the way you navigate your daily flood of news.
Stay up to date with news events across the globe and be a part in the fight against fake news.