feat: Allow absolute path for publish_dir (#400)

Close #242
This commit is contained in:
favonia 2020-07-17 22:55:50 -05:00 committed by GitHub
parent 7e92312ae4
commit e193524bff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -29,7 +29,9 @@ export async function copyAssets(publishDir: string, workDir: string): Promise<v
}
export async function setRepo(inps: Inputs, remoteURL: string, workDir: string): Promise<void> {
const publishDir = path.join(`${process.env.GITHUB_WORKSPACE}`, inps.PublishDir);
const publishDir = path.isAbsolute(inps.PublishDir)
? inps.PublishDir
: path.join(`${process.env.GITHUB_WORKSPACE}`, inps.PublishDir);
core.info(`[INFO] ForceOrphan: ${inps.ForceOrphan}`);
if (inps.ForceOrphan) {