feat: apply feedback updates and streamline online delivery
Publish GitHub Pages output / publish (push) Successful in 34s
Publish GitHub Pages output / publish (push) Successful in 34s
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { cp, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
||||
import { cp, mkdtemp, rm, writeFile } from 'node:fs/promises';
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
import process from 'node:process';
|
||||
@@ -63,8 +63,7 @@ try {
|
||||
if (diffCode === 0) {
|
||||
process.stdout.write('GitHub Pages output is already up to date.\n');
|
||||
} else if (diffCode === 1) {
|
||||
const packageJson = JSON.parse(await readFile(path.join(projectRoot, 'package.json'), 'utf8'));
|
||||
await requireGit(['commit', '-m', `deploy: HolodoriCalc v${packageJson.version}`], { cwd: checkout, env: gitEnvironment });
|
||||
await requireGit(['commit', '-m', 'deploy: update HolodoriCalc'], { cwd: checkout, env: gitEnvironment });
|
||||
await requireGit(['push', 'origin', 'HEAD:main'], { cwd: checkout, env: gitEnvironment });
|
||||
} else {
|
||||
throw new Error(`git diff failed with exit code ${diffCode}.`);
|
||||
|
||||
Reference in New Issue
Block a user