docs: add GitHub Pages repository README
Publish GitHub Pages output / publish (push) Successful in 47s
Publish GitHub Pages output / publish (push) Successful in 47s
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user