https://github.com/dataoneorg/rsync-deploy
GitHub Action to deploy resources over rsync
https://github.com/dataoneorg/rsync-deploy
action rsync ssh
Last synced: about 2 months ago
JSON representation
GitHub Action to deploy resources over rsync
- Host: GitHub
- URL: https://github.com/dataoneorg/rsync-deploy
- Owner: DataONEorg
- License: mit
- Created: 2021-11-05T18:32:31.000Z (over 4 years ago)
- Default Branch: latest
- Last Pushed: 2025-03-05T00:37:52.000Z (over 1 year ago)
- Last Synced: 2025-03-26T00:28:12.993Z (over 1 year ago)
- Topics: action, rsync, ssh
- Language: Shell
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 11
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rsync-deploy
Deploy files to a TARGET host using rsync by configuring an appropriate ssh KEY.
## Required Parameters
- `host`: Remote Hostname
- `port`: Remote Host SSH Port
- `username`: Remote Host Username
- `group`: Remote Host Group for files
- `key`: Remote Host SSH Private key for user
- `source`: Source files location (rsync naming conventions)
- `target`: Remote Host deployment location (rsync naming conventions)
## SSH Private/Public Key
Below is the command for generation of SSH keys. For the complete manual the location can be found [here](https://linux.die.net/man/1/ssh-keygen).
```
ssh-keygen -t rsa -b 4096
```
Generate and save the public key on the Remote Host at `~/.ssh/authorized_keys`.
Private keys should be exposed to the workflow as [Action Secrets](https://docs.github.com/en/actions/reference/encrypted-secrets) for better security.
## Example
Below is a sample .yml file for rsync deploy:
```yml
name: rsync-deploy
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Upload Files
uses: dataoneorg/rsync-deploy@latest
with:
host: ${{ secrets.HOST }}
group: ${{ secrets.GROUP }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
source: "/tmp/sourcedir/"
target: "~/sometargetdir/"
```
## History
This is a refactored version of scp-deployer, originally developed by siva1024 and released under the MIT license. This refactored version allows DataONE to customize and securely deploy the image for allied projects, and uses rsync rather than scp.