Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Commit

Permalink
ci: new docs:build task
Browse files Browse the repository at this point in the history
  • Loading branch information
specialdoom committed Aug 6, 2023
1 parent ea97c65 commit 55282e4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ node_modules
.histoire
coverage
test-results.xml
.idea
.idea
src/__stories__/CHANGELOG.story.md
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
"format": "prettier --write ./src/lib/**/*.{js,svelte,html,ts}",
"lint": "eslint ./src/lib/**/*.{js,ts,svelte}",
"prelint": "npm run format",
"story:build": "histoire build",
"story:preview": "histoire preview",
"hst:build": "histoire build",
"hst:preview": "histoire preview",
"docs:build": "node ./src/tasks/docs.build.js",
"prepare": "husky install",
"release": "standard-version",
"new:component": "node ./src/tasks/components/new.js"
Expand Down
19 changes: 19 additions & 0 deletions src/tasks/docs.build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { promisify } from "node:util";
import { exec } from "node:child_process";
import { cp } from "node:fs";

const execAsync = promisify(exec);
const cpAsync = promisify(cp);

try {
await cpAsync("./CHANGELOG.md", "./src/__stories__/CHANGELOG.story.md");
console.log("✅: CHANGELOG.md copied successfully!");

await execAsync("npm run hst:build");
console.log("✅: Histoire built successfully!");
} catch (e) {
console.log("📛: ", e.message);
process.exitCode = 1;
} finally {
process.exit();
}

1 comment on commit 55282e4

@vercel
Copy link

@vercel vercel bot commented on 55282e4 Aug 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

proi-ui – ./

proi-ui-git-main-specialdoom.vercel.app
proi-ui.vercel.app
proi-ui-specialdoom.vercel.app

Please sign in to comment.