mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-16 23:43:21 +08:00
fix: skip logic
This commit is contained in:
parent
4377a42d7a
commit
44bdada02c
@ -226,7 +226,7 @@ describe('skipOnFork()', () => {
|
|||||||
expect(test).toBeFalsy();
|
expect(test).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('return true on fork with empty deploy_key or personal_token', async () => {
|
test('return true on fork with no tokens', async () => {
|
||||||
const test = await skipOnFork(true, '', '', '');
|
const test = await skipOnFork(true, '', '', '');
|
||||||
expect(test).toBeTruthy();
|
expect(test).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
@ -70,11 +70,7 @@ export async function skipOnFork(
|
|||||||
personalToken: string
|
personalToken: string
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
if (isForkRepository) {
|
if (isForkRepository) {
|
||||||
if (githubToken) {
|
if (githubToken === '' && deployKey === '' && personalToken === '') {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (deployKey === '' && personalToken === '') {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user