This commit is contained in:
CrazyMax 2019-11-15 16:02:43 +01:00
parent b3039485d4
commit d40e8cac3d
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
2 changed files with 8 additions and 6 deletions

View File

@ -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;

View File

@ -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 =