Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee834289d5 | ||
|
|
a9077f3fa3 | ||
|
|
72f58a06cf | ||
|
|
a8a9c90a27 | ||
|
|
ee6484961d | ||
|
|
a8f525053d | ||
|
|
6f9a5b7a66 | ||
|
|
5c097c0f86 | ||
|
|
0f6166f02c | ||
|
|
2712ed55b1 | ||
|
|
01976c9d9b | ||
|
|
78a39ce0df | ||
|
|
90a40adfe5 | ||
|
|
d3e35b292a | ||
|
|
c97a39a35f | ||
|
|
9df954b37b | ||
|
|
dea6ee7419 | ||
|
|
2ca4395141 | ||
|
|
6546aa9608 | ||
|
|
a60eec20ec | ||
|
|
21536c05d5 | ||
|
|
3a443e3a0a | ||
|
|
c320668126 |
18
CHANGELOG.md
18
CHANGELOG.md
@@ -2,24 +2,6 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
## [3.5.4](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.3...v3.5.4) (2020-03-16)
|
||||
|
||||
|
||||
### fix
|
||||
|
||||
* skip deployment on forks (#156) ([4f06df8](https://github.com/peaceiris/actions-gh-pages/commit/4f06df820b7a5882e2faef0e6929bb670140fba0)), closes [#156](https://github.com/peaceiris/actions-gh-pages/issues/156) [#153](https://github.com/peaceiris/actions-gh-pages/issues/153)
|
||||
|
||||
|
||||
|
||||
## [3.5.4-6](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.4-5...v3.5.4-6) (2020-03-15)
|
||||
|
||||
|
||||
### fix
|
||||
|
||||
* skip logic ([44bdada](https://github.com/peaceiris/actions-gh-pages/commit/44bdada02c71f646d23ffefe1ea07d16386dbf83))
|
||||
|
||||
|
||||
|
||||
## [3.5.4-5](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.4-4...v3.5.4-5) (2020-03-14)
|
||||
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ describe('skipOnFork()', () => {
|
||||
expect(test).toBeFalsy();
|
||||
});
|
||||
|
||||
test('return true on fork with no tokens', async () => {
|
||||
test('return true on fork with empty deploy_key or personal_token', async () => {
|
||||
const test = await skipOnFork(true, '', '', '');
|
||||
expect(test).toBeTruthy();
|
||||
});
|
||||
|
||||
@@ -1769,7 +1769,7 @@ function run() {
|
||||
const isForkRepository = github_1.context.payload.repository.fork;
|
||||
const isSkipOnFork = yield utils_1.skipOnFork(isForkRepository, inps.GithubToken, inps.DeployKey, inps.PersonalToken);
|
||||
if (isSkipOnFork) {
|
||||
core.warning('This action runs on a fork and not found auth token, Skip deployment');
|
||||
core.warning('Action runs on fork and deploy_key or personal_token is empty, Skip deployment');
|
||||
return;
|
||||
}
|
||||
const remoteURL = yield set_tokens_1.setTokens(inps);
|
||||
@@ -2272,7 +2272,10 @@ exports.addCNAME = addCNAME;
|
||||
function skipOnFork(isForkRepository, githubToken, deployKey, personalToken) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (isForkRepository) {
|
||||
if (githubToken === '' && deployKey === '' && personalToken === '') {
|
||||
if (githubToken) {
|
||||
return false;
|
||||
}
|
||||
if (deployKey === '' && personalToken === '') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "actions-github-pages",
|
||||
"version": "3.5.4",
|
||||
"version": "3.5.4-5",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "actions-github-pages",
|
||||
"version": "3.5.4",
|
||||
"version": "3.5.4-5",
|
||||
"description": "GitHub Actions for GitHub Pages",
|
||||
"main": "lib/index.js",
|
||||
"engines": {
|
||||
|
||||
@@ -22,7 +22,7 @@ export async function run(): Promise<void> {
|
||||
);
|
||||
if (isSkipOnFork) {
|
||||
core.warning(
|
||||
'This action runs on a fork and not found auth token, Skip deployment'
|
||||
'Action runs on fork and deploy_key or personal_token is empty, Skip deployment'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,11 @@ export async function skipOnFork(
|
||||
personalToken: string
|
||||
): Promise<boolean> {
|
||||
if (isForkRepository) {
|
||||
if (githubToken === '' && deployKey === '' && personalToken === '') {
|
||||
if (githubToken) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (deployKey === '' && personalToken === '') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user