mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-15 22:56:54 +08:00
fix: copyAssets() for destination_dir (#414)
This commit is contained in:
parent
0b4686e3a6
commit
674c2318ce
@ -22,6 +22,10 @@ export async function copyAssets(publishDir: string, destDir: string): Promise<v
|
|||||||
}
|
}
|
||||||
const filePublishPath = path.join(publishDir, file);
|
const filePublishPath = path.join(publishDir, file);
|
||||||
const fileDestPath = path.join(destDir, file);
|
const fileDestPath = path.join(destDir, file);
|
||||||
|
const destPath = path.dirname(fileDestPath);
|
||||||
|
if (fs.existsSync(destPath) === false) {
|
||||||
|
await createDir(destPath);
|
||||||
|
}
|
||||||
await io.cp(filePublishPath, fileDestPath, copyOpts);
|
await io.cp(filePublishPath, fileDestPath, copyOpts);
|
||||||
core.info(`[INFO] copy ${file}`);
|
core.info(`[INFO] copy ${file}`);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user