diff --git a/package.json b/package.json index 8717361..5e4f05e 100644 --- a/package.json +++ b/package.json @@ -28,12 +28,12 @@ "watch": "somebuild build --watch", "dev": "somebuild dev", "build": "somebuild build", - "release": "pnpm build && node scripts/publish-branch.js", "eslint": "eslint .", "format": "eslint --fix .", "publish": "pnpm build && npm publish", "docs:dev": "vuepress dev docs", - "docs:build": "vuepress build docs" + "docs:build": "vuepress build docs", + "docs:publish": "pnpm docs:build && node scripts/publish-branch.js" }, "globals": { "vue": "Vue" diff --git a/scripts/publish-branch.js b/scripts/publish-branch.js index 3e45ce7..4c1fdd4 100644 --- a/scripts/publish-branch.js +++ b/scripts/publish-branch.js @@ -1,11 +1,10 @@ import ghpages from "gh-pages" ghpages.publish( - ".", - { dotfiles: true, branch: "published", src: ["package.json", "dist/**/*"] }, - (err) => { - if (err) - throw err - console.log("success") - }, -) + "docs/\.vuepress/dist", + { dotfiles: true, branch: "published" }, +).then(() => { + console.log("success") +}).catch((err) => { + console.error(err) +})