docs: add GitHub Pages repository README
Publish GitHub Pages output / publish (push) Successful in 47s

This commit is contained in:
2026-08-31 14:12:12 +09:00
parent bcd47d93e7
commit c01a3e534b
4 changed files with 48 additions and 3 deletions
+3 -1
View File
@@ -7,6 +7,7 @@ import { fileURLToPath } from 'node:url';
const projectRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
const siteSource = path.join(projectRoot, 'pages-dist');
const readmeSource = path.join(projectRoot, 'pages', 'README.md');
const repository = process.env.GITHUB_PAGES_REPOSITORY ?? 'https://github.com/DD4SN/DD4SN.github.io.git';
if (!process.env.GITHUB_PAGES_TOKEN) {
@@ -48,9 +49,10 @@ try {
await requireGit(['clone', repository, checkout], { env: gitEnvironment });
const generatedPaths = ['site', 'assets', 'icons', 'index.html', 'README.txt', 'VERSION.txt', '.nojekyll'];
const generatedPaths = ['site', 'assets', 'icons', 'index.html', 'README.md', 'README.txt', 'VERSION.txt', '.nojekyll'];
await Promise.all(generatedPaths.map((generatedPath) => rm(path.join(checkout, generatedPath), { recursive: true, force: true })));
await cp(siteSource, checkout, { recursive: true });
await cp(readmeSource, path.join(checkout, 'README.md'));
await writeFile(path.join(checkout, '.nojekyll'), '');
await requireGit(['config', 'user.name', 'HolodoriCalc deployment'], { cwd: checkout, env: gitEnvironment });