Skip to content

Commit

Permalink
fix: set full path of publishing assets (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris authored Jul 24, 2020
1 parent d1700b5 commit 6f6bb26
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/git-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ export async function copyAssets(publishDir: string, destDir: string): Promise<v
if (file.endsWith('.git') || file.endsWith('.github')) {
continue;
}
const filePath = path.join(publishDir, file);
await io.cp(filePath, `${destDir}/`, copyOpts);
const filePublishPath = path.join(publishDir, file);
const fileDestPath = path.join(destDir, file);
await io.cp(filePublishPath, fileDestPath, copyOpts);
core.info(`[INFO] copy ${file}`);
}

Expand Down Expand Up @@ -49,9 +50,7 @@ export async function setRepo(inps: Inputs, remoteURL: string, workDir: string):
await createDir(destDir);
process.chdir(workDir);
await createBranchForce(inps.PublishBranch);
process.chdir(destDir);
await copyAssets(publishDir, destDir);
process.chdir(workDir);
return;
}

Expand Down Expand Up @@ -106,7 +105,6 @@ export async function setRepo(inps: Inputs, remoteURL: string, workDir: string):
process.chdir(workDir);
await createBranchForce(inps.PublishBranch);
await copyAssets(publishDir, destDir);
process.chdir(workDir);
return;
}
}
Expand Down

0 comments on commit 6f6bb26

Please sign in to comment.