mirror of
https://github.com/status-im/actions-gh-pages.git
synced 2025-02-04 17:24:25 +00:00
fix: set full path of publishing assets (#413)
https://github.com/peaceiris/actions-gh-pages/issues/410#issuecomment-663507581
This commit is contained in:
parent
d1700b5653
commit
6f6bb2661a
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user