0.1.0 • Published 5 years ago
deployer-cli v0.1.0
deployer
This is actually SSH-based task runner.
Pre-requisites
To run deployer
, you need to install these in your local machine.
- nodejs
- npm
- OpenSSH (Windows)
Installation
npm install -g deployer-cli
Usage
- Configure ssh host
- Configure deploy.json
- Run deployer
Configure ssh host
Edit ~/.ssh/config
Host {name}
Hostname {hostname or ipaddress}
Port 22
User root
Note: add your public key to remote host's ~/.ssh/authorized_keys
Configure deploy.json
deploy.json
{
"host": "{name}",
"localTasks": {
"git-push": {
"commands": [
"git push origin master"
]
}
},
"remoteTasks": {
"deploy": {
"cwd": "/var/www",
"commands": [
"git pull origin master",
"php artisan config:cache",
"php artisan route:cache",
]
}
}
}
Run deployer
cd <deploy.json's location>
deployer