wonkavision
A CLI tool to make deploying things over SFTP simple.
Getting Started
-
npm install @agrc/wonkavision
-
Create
.env
file in the root of your project and populate with these values:SSH_HOST=... SSH_USERNAME=... SSH_PASSWORD=...
-
Add a new npm script to your
package.json
file:"scripts": { "deploy": "wonkavision clean && npm run build && wonkavision zip && wonkavision ship ./deploy/deploy.zip destination && wonkavision unzip destination" }
Commands
-
clean
: Folder locations to clean-
artifacts
: Array of string paths relative to the package.json- The no argument default will remove the
./deploy
directory
- The no argument default will remove the
-
-
zip
: Compress files into one location-
src
: The source folder to compress- The no argument default is
./build
- The no argument default is
-
dest
: The file path to place the compressed files- The no argument default is
./deploy
- The no argument default is
-
name
: The name of the zip file- The no argument default is
deploy.zip
- The no argument default is
-
-
ship
: Sends the zip file to the destination-
src
: The parent folder or file to ship- The no argument default is
./deploy/deploy.zip
- The no argument default is
-
dest
: The folder to place the zip file- The no argument default is
app
- The no argument default is
-
-
unzip
: Decompress files on the SSH host, deleting the zip file after decompression-
dest
: The destination folder containing the zip file- The no argument default is
app
- The no argument default is
-
name
: The name of the compressed zip file- The no argument default is
deploy.zip
- The no argument default is
-
--extra-command
: a command to run after the zip file is decompressed
-
All commands can be run with a --dry-run
flag to not perform any action`