mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00

* Additional Integration tests (#123) * Update integration-beta.yml * git fetch again * git fetch * Tests * Failing Build (#124) * Bump @types/node from 13.1.6 to 13.1.7 (#126) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.1.6 to 13.1.7. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump @types/jest from 24.0.25 to 24.9.0 (#127) Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 24.0.25 to 24.9.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * js > ts * License Upgrades * Bump typescript from 3.7.4 to 3.7.5 (#132) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.7.4 to 3.7.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v3.7.4...v3.7.5) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * [Issue-133] Customizable Commit Messages (#134) * Customizable Commit Messages * Removes lodash * Update package.json * README * Changes * Check for null * Adds a dash * Support action/checkout@v2 (#136) * Create CODEOWNERS * Update integration.yml * Adds automatic issue labels (#139) * [Issue-130] SSH Support (#140) * First pass at deploy key support * Needed * More ssh * Adds keyscan * Another look at this * More things.... * w * Path to home * w * k * Update git.ts * ff * dd * test * File Sync maybe * Adds SSH Examples * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * x * c * Update README.md * Integration tests * Update integration-beta.yml * More Changes * Update README.md * README Reorg * Update README.md * Update README.md * Update README.md * Adds correct metadata * Update action.yml * Formatting * Update build.yml * Adds CodeCov report * Update README.md * Test Coverage Improvements (#141) * Test Coverage Improvements * Update env.js * More Test Coverage / Imps * Update README.md * Formatting * Update git.js * Test Names... * Update action.yml Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
56 lines
2.2 KiB
JavaScript
56 lines
2.2 KiB
JavaScript
"use strict";
|
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
if (mod && mod.__esModule) return mod;
|
|
var result = {};
|
|
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
result["default"] = mod;
|
|
return result;
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const core_1 = require("@actions/core");
|
|
const github = __importStar(require("@actions/github"));
|
|
const { pusher, repository } = github.context.payload;
|
|
exports.workspace = process.env.GITHUB_WORKSPACE;
|
|
exports.folder = core_1.getInput("FOLDER", { required: true });
|
|
exports.root = ".";
|
|
// Required action data.
|
|
exports.action = {
|
|
accessToken: core_1.getInput("ACCESS_TOKEN"),
|
|
baseBranch: core_1.getInput("BASE_BRANCH"),
|
|
build: exports.folder,
|
|
branch: core_1.getInput("BRANCH"),
|
|
commitMessage: core_1.getInput("COMMIT_MESSAGE"),
|
|
clean: core_1.getInput("CLEAN"),
|
|
cleanExclude: core_1.getInput("CLEAN_EXCLUDE"),
|
|
defaultBranch: process.env.GITHUB_SHA ? process.env.GITHUB_SHA : "master",
|
|
isTest: process.env.UNIT_TEST,
|
|
ssh: core_1.getInput("SSH"),
|
|
email: pusher && pusher.email
|
|
? pusher.email
|
|
: `${process.env.GITHUB_ACTOR ||
|
|
"github-pages-deploy-action"}@users.noreply.github.com`,
|
|
gitHubRepository: repository && repository.full_name
|
|
? repository.full_name
|
|
: process.env.GITHUB_REPOSITORY,
|
|
gitHubToken: core_1.getInput("GITHUB_TOKEN"),
|
|
name: pusher && pusher.name
|
|
? pusher.name
|
|
: process.env.GITHUB_ACTOR
|
|
? process.env.GITHUB_ACTOR
|
|
: "GitHub Pages Deploy Action",
|
|
targetFolder: core_1.getInput("TARGET_FOLDER")
|
|
};
|
|
// Token Types
|
|
exports.tokenType = exports.action.ssh
|
|
? "SSH Deploy Key"
|
|
: exports.action.accessToken
|
|
? "Access Token"
|
|
: exports.action.gitHubToken
|
|
? "GitHub Token"
|
|
: "...";
|
|
// Repository path used for commits/pushes.
|
|
exports.repositoryPath = exports.action.ssh
|
|
? `git@github.com:${exports.action.gitHubRepository}`
|
|
: `https://${exports.action.accessToken ||
|
|
`x-access-token:${exports.action.gitHubToken}`}@github.com/${exports.action.gitHubRepository}.git`;
|