-
-
Notifications
You must be signed in to change notification settings - Fork 944
Expand file tree
/
Copy pathdeploy.docs-json.js
More file actions
24 lines (22 loc) · 804 Bytes
/
deploy.docs-json.js
File metadata and controls
24 lines (22 loc) · 804 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
const ghpages = require("gh-pages");
const path = require("path");
const ghToken = process.env.GITHUB_TOKEN, gitUser = ghToken ? {
name: "github-actions-bot", email: "support+actions@github.com",
} : {
name: "Matteo Bruni", email: "176620+matteobruni@users.noreply.github.com",
};
ghpages.publish(path.resolve("."), {
src: "docs.json",
repo: ghToken ? `https://git:${ghToken}@github.com/tsparticles/tsparticles.git` : `https://github.com/tsparticles/tsparticles.git`,
branch: "docs-gen",
dotfiles: true,
history: false,
message: "build: docs-gen updated",
user: gitUser,
}, function(publishErr) {
if (!publishErr) {
console.log("Docs JSON published successfully");
} else {
console.log(`Error publishing Docs JSON: ${publishErr}`);
}
});