-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshipitfile.js.example
More file actions
29 lines (27 loc) · 854 Bytes
/
Copy pathshipitfile.js.example
File metadata and controls
29 lines (27 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
module.exports = function (shipit) {
require("shipit-deploy")(shipit);
shipit.initConfig({
default: {
workspace: "/tmp/shipit",
deployTo: "/var/www/my-example-project",
repositoryUrl: "git@github.com:hannahhoward/my-example-project.git",
ignores: [".git", "node_modules"],
keepReleases: 2,
deleteOnRollback: false,
shallowClone: true
},
production: {
servers: "root@my-example-server.com"
}
});
shipit.blTask("build", () => {
return shipit.local("ln -s ~/presentations/my-example-project/node_modules /tmp/shipit/node_modules").then(() => {
return shipit.local("npm install", { cwd: "/tmp/shipit" });
}).then(() => {
return shipit.local("npm run build", { cwd: "/tmp/shipit" });
});
});
shipit.on("fetched", () => {
shipit.start("build");
});
};