Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripts/deploy-gh-pages.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

import { execSync } from 'node:child_process';
import { execFileSync, execSync } from 'node:child_process';
import fs from 'node:fs';
import path from 'node:path';
import os from 'node:os';
Expand All @@ -21,11 +21,11 @@ try {
env: { ...process.env, GIT_INDEX_FILE: tmpIndex },
encoding: 'utf8',
}).trim();
const commit = execSync(`git commit-tree ${tree} -m "deploy: update gh-pages to modern viewer"`, {
const commit = execFileSync('git', ['commit-tree', tree, '-m', 'deploy: update gh-pages to modern viewer'], {
encoding: 'utf8',
}).trim();
console.log(`Created deployment commit: ${commit}`);
execSync(`git push origin ${commit}:refs/heads/gh-pages --force`, {
execFileSync('git', ['push', 'origin', `${commit}:refs/heads/gh-pages`, '--force'], {
stdio: 'inherit',
});
console.log('Successfully deployed to gh-pages branch on origin!');
Expand Down