Fix test
This commit is contained in:
parent
b3039485d4
commit
d40e8cac3d
|
@ -63,9 +63,10 @@ function run() {
|
||||||
const tmpdir = fs.mkdtempSync(path.join(os.tmpdir(), 'github-pages-'));
|
const tmpdir = fs.mkdtempSync(path.join(os.tmpdir(), 'github-pages-'));
|
||||||
process.chdir(tmpdir);
|
process.chdir(tmpdir);
|
||||||
core.info(`🏃 Copying ${path.resolve(build_dir)} contents to ${tmpdir}`);
|
core.info(`🏃 Copying ${path.resolve(build_dir)} contents to ${tmpdir}`);
|
||||||
ncp_1.default.ncp(path.resolve(build_dir), tmpdir, {}, err => {
|
ncp_1.default.ncp(path.resolve(build_dir), tmpdir, err => {
|
||||||
|
if (err !== null) {
|
||||||
core.setFailed(`⛔️ Failed to copy ${path.resolve(build_dir)}`);
|
core.setFailed(`⛔️ Failed to copy ${path.resolve(build_dir)}`);
|
||||||
return;
|
}
|
||||||
});
|
});
|
||||||
const remote_branch_exists = child_process.execSync(`git ls-remote --heads ${remote_url} ${target_branch}`, { encoding: 'utf8' }).trim().length >
|
const remote_branch_exists = child_process.execSync(`git ls-remote --heads ${remote_url} ${target_branch}`, { encoding: 'utf8' }).trim().length >
|
||||||
0;
|
0;
|
||||||
|
|
|
@ -45,9 +45,10 @@ async function run() {
|
||||||
process.chdir(tmpdir);
|
process.chdir(tmpdir);
|
||||||
|
|
||||||
core.info(`🏃 Copying ${path.resolve(build_dir)} contents to ${tmpdir}`);
|
core.info(`🏃 Copying ${path.resolve(build_dir)} contents to ${tmpdir}`);
|
||||||
ncp.ncp(path.resolve(build_dir), tmpdir, {}, err => {
|
ncp.ncp(path.resolve(build_dir), tmpdir, err => {
|
||||||
|
if (err !== null) {
|
||||||
core.setFailed(`⛔️ Failed to copy ${path.resolve(build_dir)}`);
|
core.setFailed(`⛔️ Failed to copy ${path.resolve(build_dir)}`);
|
||||||
return;
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const remote_branch_exists =
|
const remote_branch_exists =
|
||||||
|
|
Loading…
Reference in New Issue
Block a user