chore: Update git command to use custom SSH key for pulling articles

This commit is contained in:
Keisuke Hirata 2024-09-03 06:58:13 +09:00
parent 8a5d09d615
commit 04f9bd5e99

View File

@ -7,7 +7,7 @@ import { execSync } from 'child_process';
export default async function init(db: Postgres) { export default async function init(db: Postgres) {
if (fs.existsSync('./articles/')) { if (fs.existsSync('./articles/')) {
console.log('Pulling articles from git..'); console.log('Pulling articles from git..');
const stdout = execSync('git pull', { cwd: './articles/' }); const stdout = execSync('git -c core.sshCommand="ssh -i ../key -F /dev/null" pull', { cwd: './articles/' });
console.log(stdout.toString()); console.log(stdout.toString());
} }