mirror of
https://github.com/status-im/actions-gh-pages.git
synced 2025-02-05 01:33:37 +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')) {
|
if (file.endsWith('.git') || file.endsWith('.github')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const filePath = path.join(publishDir, file);
|
const filePublishPath = path.join(publishDir, file);
|
||||||
await io.cp(filePath, `${destDir}/`, copyOpts);
|
const fileDestPath = path.join(destDir, file);
|
||||||
|
await io.cp(filePublishPath, fileDestPath, copyOpts);
|
||||||
core.info(`[INFO] copy ${file}`);
|
core.info(`[INFO] copy ${file}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,9 +50,7 @@ export async function setRepo(inps: Inputs, remoteURL: string, workDir: string):
|
|||||||
await createDir(destDir);
|
await createDir(destDir);
|
||||||
process.chdir(workDir);
|
process.chdir(workDir);
|
||||||
await createBranchForce(inps.PublishBranch);
|
await createBranchForce(inps.PublishBranch);
|
||||||
process.chdir(destDir);
|
|
||||||
await copyAssets(publishDir, destDir);
|
await copyAssets(publishDir, destDir);
|
||||||
process.chdir(workDir);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +105,6 @@ export async function setRepo(inps: Inputs, remoteURL: string, workDir: string):
|
|||||||
process.chdir(workDir);
|
process.chdir(workDir);
|
||||||
await createBranchForce(inps.PublishBranch);
|
await createBranchForce(inps.PublishBranch);
|
||||||
await copyAssets(publishDir, destDir);
|
await copyAssets(publishDir, destDir);
|
||||||
process.chdir(workDir);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user