mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Update git.ts
This commit is contained in:
parent
682d643fa8
commit
08b281c798
15
src/git.ts
15
src/git.ts
@ -82,6 +82,21 @@ export async function deploy(): Promise<any> {
|
||||
workspace
|
||||
);
|
||||
|
||||
// Ensures that items that need to be excluded from the clean job get parsed.
|
||||
let excludes = "";
|
||||
if (action.clean && action.cleanExclude) {
|
||||
try {
|
||||
const excludedItems = JSON.parse(action.cleanExclude);
|
||||
excludedItems.forEach(
|
||||
(item: string) => (excludes += `--exclude ${item} `)
|
||||
);
|
||||
} catch {
|
||||
console.log(
|
||||
"There was an error parsing your CLEAN_EXCLUDE items. Please refer to the README for more details."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Pushes all of the build files into the deployment directory.
|
||||
Allows the user to specify the root if '.' is provided.
|
||||
|
Loading…
Reference in New Issue
Block a user