Skip to content

Commit e193524

Browse files
authored
feat: Allow absolute path for publish_dir (#400)
Close #242
1 parent 7e92312 commit e193524

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/git-utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ export async function copyAssets(publishDir: string, workDir: string): Promise<v
2929
}
3030

3131
export async function setRepo(inps: Inputs, remoteURL: string, workDir: string): Promise<void> {
32-
const publishDir = path.join(`${process.env.GITHUB_WORKSPACE}`, inps.PublishDir);
32+
const publishDir = path.isAbsolute(inps.PublishDir)
33+
? inps.PublishDir
34+
: path.join(`${process.env.GITHUB_WORKSPACE}`, inps.PublishDir);
3335

3436
core.info(`[INFO] ForceOrphan: ${inps.ForceOrphan}`);
3537
if (inps.ForceOrphan) {

0 commit comments

Comments
 (0)