vite-plugin-sftp-deploy
v1.2.0
Published
SFTP uploader plugin to deploy the project trough SSH
Downloads
6
Readme
SFTP Vite Deploy
A Vite plugin that allows you to automatically deploy your project to your SFTP server using NodeSSH
Installation
with npm
npm install vite-plugin-sftp-deploy -D
with pnpm
pnpm install vite-plugin-sftp-deploy -D
Example
import UploadToSFTP from 'ssh-vite-deploy';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
UploadToSFTP({
host: 'sftp.example.com',
username: 'test',
password: 'supersecurepassword',
port: 22,
remotePath: 'www',
localPath: process.cwd() + '/dist',
verbose: true
})
],
})
Variables
| Parameter | Type | Description |
| :-------- | :------- | :------------------------- |
| host
| string
| Required. The SSH server host url |
| username
| string
| Required. The SSH username |
| password
| string
| Required. The SSH password |
| remotePath
| string
| Required. The SSH remote path to put the files |
| localPath
| string
| The local path to grab the files (Default: process.cwd() + 'dist') |
| port
| number
| The SSH server port (Default: 22) |
| verbose
| boolean
| Show all logs (Default: false) |
Acknowledgements
Authors
Used By
This project is used by the following companies: