- Create a project directory
- Create a configuration file into the project dir
deploy.json
{
"git": {
"token": "github token",
"org": "organisation name",
"repo": "repository name",
"branch": "main"
},
"symlink": {
"source from project root": "target"
},
"copy": {
"source from project root": "target"
},
"target": "deployment location",
"scripts": {
"stop": [
"echo stop service"
],
"start": [
"echo start service"
],
"prepare": [
"npm install",
"echo prepare project"
]
}
}
- Call the script
node deploy <project folder name>