36 lines
847 B
Markdown
36 lines
847 B
Markdown
# Rsync action
|
|
|
|
This action sends the contents of a directory to a remote server using [rsync][rsync].
|
|
|
|
## Usage
|
|
|
|
Basic usage:
|
|
|
|
```yaml
|
|
- name: Transfer files
|
|
uses: https://git.pvv.ntnu.no/oysteikt/rsync-action@v1
|
|
with:
|
|
source: ./path/to/directory/
|
|
target: /path/at/remote/
|
|
username: username
|
|
host: hostname
|
|
ssh-key: ${{ secrets.SSH_KEY }}
|
|
```
|
|
|
|
Advanced usage:
|
|
|
|
```yaml
|
|
- name: Transfer files
|
|
uses: https://git.pvv.ntnu.no/oysteikt/rsync-action@v1
|
|
with:
|
|
source: ./path/to/directory/
|
|
target: /path/at/remote/
|
|
username: username
|
|
host: hostname
|
|
port: 2222
|
|
ssh-key: ${{ secrets.SSH_KEY }}
|
|
args: -avz --mkpath --exclude 'node_modules' --delete
|
|
known-hosts: "[hostname]:2222 ssh-ed25519 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
```
|
|
|
|
[rsync]: https://rsync.samba.org/ |