fix: set full path of publishing assets (#413)

https://github.com/peaceiris/actions-gh-pages/issues/410#issuecomment-663507581
This commit is contained in:
Shohei Ueda
2020-07-24 21:33:08 +09:00
committed by GitHub
parent d1700b5653
commit 6f6bb2661a

View File

@@ -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}`);
}
@@ -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;
}
@@ -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;
}
}