Skip to content

Commit 3946cd5

Browse files
committed
Fix build.js
1 parent 94dd1e8 commit 3946cd5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

build.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const path = require("path")
99
const fs = require("fs").promises
1010
const parseChangelog = require('changelog-parser')
1111
const { Octokit } = require("@octokit/rest");
12+
const ghpages = require("gh-pages")
1213

1314
const info = chalk.blueBright
1415
const warn = chalk.yellow
@@ -43,13 +44,13 @@ const shellExecInDemoProject = (command) => {
4344
)
4445
}
4546

46-
const ghreleasePromise = (options) => {
47+
const ghpagesPublishPromise = (path, config) => {
4748
return new Promise((resolve, reject) => {
48-
ghrelease(options, (err, result) => {
49+
ghpages.publish(path, config, (err) => {
4950
if (err) {
5051
reject(err)
5152
} else {
52-
resolve(result)
53+
resolve()
5354
}
5455
})
5556
})
@@ -219,7 +220,7 @@ const publishHandler = async (argv) => {
219220
}
220221

221222
// Publish the demo on Github Pages
222-
await ghpagesPublisPromise(resolve("demo", "output"))
223+
await ghpagesPublishPromise(resolve("demo", "output"))
223224

224225
}
225226

0 commit comments

Comments
 (0)