Make Pages deploy script portable
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { spawnSync } from 'node:child_process';
|
||||
|
||||
const projectName = process.env.CLOUDFLARE_PROJECT_NAME ?? 'decodal-site';
|
||||
const branch = process.env.CLOUDFLARE_BRANCH ?? 'master';
|
||||
|
||||
const result = spawnSync(
|
||||
'wrangler',
|
||||
['pages', 'deploy', 'dist', '--project-name', projectName, '--branch', branch],
|
||||
{ stdio: 'inherit', shell: process.platform === 'win32' },
|
||||
);
|
||||
|
||||
process.exit(result.status ?? 1);
|
||||
Reference in New Issue
Block a user