diff --git a/lib/main.js b/lib/main.js index 40cebff..18da640 100644 --- a/lib/main.js +++ b/lib/main.js @@ -44,6 +44,7 @@ function run() { core.info(`🏃 Deploying ${build_dir} directory to ${target_branch} branch on ${repo} repo`); process.chdir(build_dir); yield exec.exec('git', ['init']); + yield exec.exec('git', ['checkout', '--orphan', target_branch]); yield exec.exec('git', ['config', 'user.name', commit_name]); yield exec.exec('git', ['config', 'user.email', commit_email]); try { diff --git a/src/main.ts b/src/main.ts index 1a6ea78..40a61d3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -30,6 +30,7 @@ async function run() { process.chdir(build_dir); await exec.exec('git', ['init']); + await exec.exec('git', ['checkout', '--orphan', target_branch]); await exec.exec('git', ['config', 'user.name', commit_name]); await exec.exec('git', ['config', 'user.email', commit_email]);