https://github.com/creepios/sftp-action
GitHub Action to upload files/directories via ssh
https://github.com/creepios/sftp-action
action deploy deployment sftp sftp-upload ssh
Last synced: 6 months ago
JSON representation
GitHub Action to upload files/directories via ssh
- Host: GitHub
- URL: https://github.com/creepios/sftp-action
- Owner: Creepios
- License: mit
- Created: 2021-04-16T17:08:22.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-10T09:00:32.000Z (over 1 year ago)
- Last Synced: 2025-09-23T10:30:45.307Z (6 months ago)
- Topics: action, deploy, deployment, sftp, sftp-upload, ssh
- Language: JavaScript
- Homepage:
- Size: 380 KB
- Stars: 28
- Watchers: 2
- Forks: 10
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Currently, not active maintained, but working!
# sftp-action
This action can (currently only) upload files and directories over sftp with ssh login.
## Inputs
### `host`
**Required** The hostname under which you can reach the server. Default `"localhost"`.
### `port`
**Required** The port under which you can reach the server. Default `22`.
### `username`
**Required** The login name. Default `"root"`.
### `password`
**Required** The login password. Default `"password"`.
### `localPath`
**Required** Path to a local file or directory.
### `remotePath`
**Required** Path to a remote file or directory (Any non existing directory or file will be created).
### `agent`
**Optional** Path to local SSH Agent (key-forwarding).
### `privateKey`
**Optional** Path to key file or directly the key (via secret or paste).
### `privateKeyIsFile`
**Optional** Define if private key is a local file or string. Default `"false"`.
### `passphrase`
**Optional** Define a passphrase for encrypted private keys.
### `additionalPaths`
**Optional** Upload multiple files. type: JSON Object (key/ value). E.g '{"localPath":"remotePath"}'.
## Example usage
```
on: [push]
jobs:
upload_files:
runs-on: ubuntu-latest
name: Upload a builded file.
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Upload Files
id: upload
uses: Creepios/sftp-action@v1.0.3
with:
host: '127.0.0.1'
port: 22
username: 'root'
password: 'password'
localPath: './dist/index.js'
remotePath: './'
```