Compare commits

...

5 Commits

Author SHA1 Message Date
peaceiris
9d932c08b7 chore(release): 3.5.5
Some checks failed
Release / release (push) Has been cancelled
2020-03-16 11:49:22 +09:00
peaceiris
53c9fb0da1 chore(release): Add build assets 2020-03-16 11:49:22 +09:00
Shohei Ueda
d6bd6182f2 fix: skip on fork if pull_request (#158)
cf. #157
2020-03-16 11:48:40 +09:00
peaceiris
01fdaf2f02 chore: Add new task all 2020-03-16 00:43:59 +00:00
peaceiris
75c03d0413 chore(release): Remove build assets [skip ci] 2020-03-16 09:01:39 +09:00
6 changed files with 43 additions and 19 deletions

View File

@@ -2,6 +2,19 @@
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.5](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.4...v3.5.5) (2020-03-16)
### chore
* Add new task all ([01fdaf2](https://github.com/peaceiris/actions-gh-pages/commit/01fdaf2f0274401d2403c809b20c37fb7a8535a6))
### fix
* skip on fork if pull_request (#158) ([d6bd618](https://github.com/peaceiris/actions-gh-pages/commit/d6bd6182f264ce695613180743d42e377570bbf4)), closes [#158](https://github.com/peaceiris/actions-gh-pages/issues/158) [#157](https://github.com/peaceiris/actions-gh-pages/issues/157)
## [3.5.4](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.3...v3.5.4) (2020-03-16)

View File

@@ -21,3 +21,7 @@ test:
.PHONY: commit
commit:
$(DOCKER_RUN) git commit -m "$(msg)"
.PHONY: all
all:
$(DOCKER_RUN) npm run all

View File

@@ -1766,11 +1766,14 @@ function run() {
try {
const inps = get_inputs_1.getInputs();
get_inputs_1.showInputs(inps);
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');
return;
const eventName = github_1.context.eventName;
if (eventName === 'pull_request') {
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');
return;
}
}
const remoteURL = yield set_tokens_1.setTokens(inps);
core.debug(`[INFO] remoteURL: ${remoteURL}`);

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "actions-github-pages",
"version": "3.5.4",
"version": "3.5.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "actions-github-pages",
"version": "3.5.4",
"version": "3.5.5",
"description": "GitHub Actions for GitHub Pages",
"main": "lib/index.js",
"engines": {
@@ -8,6 +8,7 @@
"npm": ">=6.14.2"
},
"scripts": {
"all": "npm run format && npm run lint && npm test",
"lint": "eslint ./{src,__tests__}/**/*.ts",
"lint:fix": "eslint --fix ./{src,__tests__}/**/*.ts",
"test": "jest --coverage --verbose --detectOpenHandles",

View File

@@ -12,19 +12,22 @@ export async function run(): Promise<void> {
const inps: Inputs = getInputs();
showInputs(inps);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const isForkRepository = (context.payload as any).repository.fork;
const isSkipOnFork = await 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'
const eventName = context.eventName;
if (eventName === 'pull_request') {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const isForkRepository = (context.payload as any).repository.fork;
const isSkipOnFork = await skipOnFork(
isForkRepository,
inps.GithubToken,
inps.DeployKey,
inps.PersonalToken
);
return;
if (isSkipOnFork) {
core.warning(
'This action runs on a fork and not found auth token, Skip deployment'
);
return;
}
}
const remoteURL = await setTokens(inps);