mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-15 14:43:21 +08:00
parent
01fdaf2f02
commit
d6bd6182f2
27
src/main.ts
27
src/main.ts
@ -12,19 +12,22 @@ export async function run(): Promise<void> {
|
|||||||
const inps: Inputs = getInputs();
|
const inps: Inputs = getInputs();
|
||||||
showInputs(inps);
|
showInputs(inps);
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
const eventName = context.eventName;
|
||||||
const isForkRepository = (context.payload as any).repository.fork;
|
if (eventName === 'pull_request') {
|
||||||
const isSkipOnFork = await skipOnFork(
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
isForkRepository,
|
const isForkRepository = (context.payload as any).repository.fork;
|
||||||
inps.GithubToken,
|
const isSkipOnFork = await skipOnFork(
|
||||||
inps.DeployKey,
|
isForkRepository,
|
||||||
inps.PersonalToken
|
inps.GithubToken,
|
||||||
);
|
inps.DeployKey,
|
||||||
if (isSkipOnFork) {
|
inps.PersonalToken
|
||||||
core.warning(
|
|
||||||
'This action runs on a fork and not found auth token, Skip deployment'
|
|
||||||
);
|
);
|
||||||
return;
|
if (isSkipOnFork) {
|
||||||
|
core.warning(
|
||||||
|
'This action runs on a fork and not found auth token, Skip deployment'
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const remoteURL = await setTokens(inps);
|
const remoteURL = await setTokens(inps);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user