mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-16 07:03:13 +08:00
fix: property access
This commit is contained in:
parent
a8a9c90a27
commit
72f58a06cf
@ -12,9 +12,8 @@ export async function run(): Promise<void> {
|
|||||||
const inps: Inputs = getInputs();
|
const inps: Inputs = getInputs();
|
||||||
showInputs(inps);
|
showInputs(inps);
|
||||||
|
|
||||||
const isForkRepository =
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
const isForkRepository = (context.payload as any).repository.fork;
|
||||||
(context.payload as any).repository.fork === 'true';
|
|
||||||
const isSkipOnFork = await skipOnFork(
|
const isSkipOnFork = await skipOnFork(
|
||||||
isForkRepository,
|
isForkRepository,
|
||||||
inps.GithubToken,
|
inps.GithubToken,
|
||||||
@ -22,6 +21,9 @@ export async function run(): Promise<void> {
|
|||||||
inps.PersonalToken
|
inps.PersonalToken
|
||||||
);
|
);
|
||||||
if (isSkipOnFork) {
|
if (isSkipOnFork) {
|
||||||
|
core.warning(
|
||||||
|
'Action runs on fork and deploy_key or personal_token is empty, Skip deployment'
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,9 +75,6 @@ export async function skipOnFork(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (deployKey === '' && personalToken === '') {
|
if (deployKey === '' && personalToken === '') {
|
||||||
core.warning(
|
|
||||||
'Action runs on fork and deploy_key or personal_token is empty'
|
|
||||||
);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user