Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a36604631 | ||
|
|
a8fa52a354 | ||
|
|
74f652acfd | ||
|
|
7b9b3b3f5f |
@@ -2,6 +2,15 @@
|
||||
|
||||
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.2.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.1.0...v3.2.0) (2020-02-19)
|
||||
|
||||
|
||||
### feat
|
||||
|
||||
* Remove warning about GITHUB_TOKEN (#108) ([74f652a](https://github.com/peaceiris/actions-gh-pages/commit/74f652acfdfc3290f8b6f7c5e65fd1f563412cf5)), closes [#108](https://github.com/peaceiris/actions-gh-pages/issues/108) [#9](https://github.com/peaceiris/actions-gh-pages/issues/9)
|
||||
|
||||
|
||||
|
||||
# [3.1.0](https://github.com/peaceiris/actions-gh-pages/compare/v3.0.3...v3.1.0) (2020-02-19)
|
||||
|
||||
|
||||
|
||||
@@ -9571,14 +9571,11 @@ Host github
|
||||
}
|
||||
exports.setSSHKey = setSSHKey;
|
||||
function setGithubToken(inps, publishRepo) {
|
||||
var _a, _b;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.info('[INFO] setup GITHUB_TOKEN');
|
||||
const context = github.context;
|
||||
const payload = github.context.payload;
|
||||
core.debug(`ref: ${context.ref}`);
|
||||
core.debug(`eventName: ${context.eventName}`);
|
||||
core.debug(`private: ${(_a = payload.repository) === null || _a === void 0 ? void 0 : _a.private}`);
|
||||
let isProhibitedBranch = false;
|
||||
const ref = context.ref;
|
||||
if (context.eventName === 'push') {
|
||||
@@ -9587,13 +9584,9 @@ function setGithubToken(inps, publishRepo) {
|
||||
throw new Error(`You deploy from ${inps.PublishBranch} to ${inps.PublishBranch}`);
|
||||
}
|
||||
}
|
||||
const isPrivateRepository = (_b = payload.repository) === null || _b === void 0 ? void 0 : _b.private;
|
||||
if (inps.ExternalRepository) {
|
||||
throw new Error('GITHUB_TOKEN does not support to push to an external repository');
|
||||
}
|
||||
if (isPrivateRepository === false) {
|
||||
core.warning('GITHUB_TOKEN does not support to trigger the GitHub Pages build event on a public repository');
|
||||
}
|
||||
return `https://x-access-token:${inps.GithubToken}@github.com/${publishRepo}.git`;
|
||||
});
|
||||
}
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "actions-github-pages",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "actions-github-pages",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.0",
|
||||
"description": "GitHub Actions for GitHub Pages",
|
||||
"main": "lib/index.js",
|
||||
"engines": {
|
||||
|
||||
@@ -73,10 +73,8 @@ export async function setGithubToken(
|
||||
core.info('[INFO] setup GITHUB_TOKEN');
|
||||
|
||||
const context = github.context;
|
||||
const payload = github.context.payload;
|
||||
core.debug(`ref: ${context.ref}`);
|
||||
core.debug(`eventName: ${context.eventName}`);
|
||||
core.debug(`private: ${payload.repository?.private}`);
|
||||
let isProhibitedBranch = false;
|
||||
|
||||
const ref = context.ref;
|
||||
@@ -89,17 +87,11 @@ export async function setGithubToken(
|
||||
}
|
||||
}
|
||||
|
||||
const isPrivateRepository = payload.repository?.private;
|
||||
if (inps.ExternalRepository) {
|
||||
throw new Error(
|
||||
'GITHUB_TOKEN does not support to push to an external repository'
|
||||
);
|
||||
}
|
||||
if (isPrivateRepository === false) {
|
||||
core.warning(
|
||||
'GITHUB_TOKEN does not support to trigger the GitHub Pages build event on a public repository'
|
||||
);
|
||||
}
|
||||
|
||||
return `https://x-access-token:${inps.GithubToken}@github.com/${publishRepo}.git`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user