Deployy McDeployface
A simple, stupid Node-based deploy script working with GitHub Webhooks.
Setup
git clone https://github.com/jwilsson/deployy-mcdeployface.git
cd deployy-mcdeployface/
npm install
npm run build
Usage example
Running and watching it via forever:
forever start --watch --watchDirectory dist dist/index.js /path/to/config.json
Running and watching it via pm2:
pm2 start --watch dist/ start dist/index.js -- /path/to/config.json
When you start you will get a list of what webhooks to add to each repo.
The URL to ping should include a name of the repo in a target
query string, http://example.com:1234/?target=deployy-mcdeployface
will trigger a deploy for this script.
Then, whenever a push to a GitHub repo is made, this script will be pinged and perform the steps outlined for that repo.
For example:
{
"port": 1234,
"host": "example.com",
"stopOnError": true,
"repos": {
"deployy-mcdeployface": {
"path": "/local/path/to/repo",
"commands": [
"git pull",
"npm install",
"npm run build"
]
}
}
}