Skip to content

Commit

Permalink
Retry sitemap again.
Browse files Browse the repository at this point in the history
  • Loading branch information
samchon committed Sep 4, 2024
1 parent 771dc2b commit 41ec427
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
11 changes: 0 additions & 11 deletions website/build/deploy.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
const cp = require("child_process");
const fs = require("fs");
const deploy = require("gh-pages");

cp.execSync("npm run build", { stdio: "inherit" });

for (const file of fs.readdirSync(`${__dirname}/../public`))
if (
file === "robots.txt" ||
(file.startsWith("sitemap") && file.endsWith(".xml"))
)
fs.copyFileSync(
`${__dirname}/../public/${file}`,
`${__dirname}/../out/${file}`,
);

deploy.publish(
"out",
{
Expand Down
17 changes: 17 additions & 0 deletions website/build/sitemap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const cp = require("child_process");
const fs = require("fs");

cp.execSync("next-sitemap", {
stdio: "inherit",
cwd: `${__dirname}/..`,
});

for (const file of fs.readdirSync(`${__dirname}/../public`))
if (
file === "robots.txt" ||
(file.startsWith("sitemap") && file.endsWith(".xml"))
)
fs.copyFileSync(
`${__dirname}/../public/${file}`,
`${__dirname}/../out/${file}`,
);
4 changes: 2 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "Typia Guide Documents",
"private": true,
"scripts": {
"build": "rimraf .next && rimraf out && npm run build:typedoc && next build && next-sitemap",
"build": "rimraf .next && rimraf out && npm run build:typedoc && next build && node build/sitemap",
"build:typedoc": "typedoc --plugin typedoc-github-theme --theme typedoc-github-theme",
"deploy": "node build/deploy",
"dev": "next dev",
"dev": "next-sitemap && next dev",
"prepare": "node build/raw && rspack && npm run build:typedoc"
},
"repository": {
Expand Down

0 comments on commit 41ec427

Please sign in to comment.