mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
71b19fd2fb
* Corrects exporting * README Changes * Forgot the compiled code. * Configuration changes * Moving action package * Update README.md * Update README.md * Improving example * Update README.md * Update src/lib.ts Co-Authored-By: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> * Correctly building types * Update README.md * Configuration update * Update README.md * Re-assigning * Missing chnage * More changes * Some more information * Setting changes to repositoryPath and tokenType * Compiling * Update package.json * Token hiding * Package Exporting Changes (#185) * Initiial Changes * Changes to action * Compiled * Added better logging for when debug is off... * Removing base branch logging as it's not really required * throw new Error -> throw * Debug flag as an variable * Update README.md * More README Changes * Update README.md * Update README.md * Update README.md * error.message * Fixes the debug flag * Changing the directory routing for shell scripting * Tidying! * Changing to const * Promotion Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
50 lines
2.1 KiB
JavaScript
50 lines
2.1 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 util_1 = require("./util");
|
|
const { pusher, repository } = github.context.payload;
|
|
/* Required action data that gets initialized when running within the GitHub Actions environment. */
|
|
exports.action = {
|
|
accessToken: core_1.getInput("ACCESS_TOKEN"),
|
|
baseBranch: core_1.getInput("BASE_BRANCH"),
|
|
folder: core_1.getInput("FOLDER"),
|
|
branch: core_1.getInput("BRANCH"),
|
|
commitMessage: core_1.getInput("COMMIT_MESSAGE"),
|
|
clean: core_1.getInput("CLEAN"),
|
|
cleanExclude: core_1.getInput("CLEAN_EXCLUDE"),
|
|
debug: core_1.getInput("DEBUG"),
|
|
defaultBranch: process.env.GITHUB_SHA ? process.env.GITHUB_SHA : "master",
|
|
isTest: process.env.UNIT_TEST,
|
|
ssh: core_1.getInput("SSH"),
|
|
email: !util_1.isNullOrUndefined(core_1.getInput("GIT_CONFIG_EMAIL"))
|
|
? core_1.getInput("GIT_CONFIG_EMAIL")
|
|
: pusher && pusher.email
|
|
? pusher.email
|
|
: `${process.env.GITHUB_ACTOR ||
|
|
"github-pages-deploy-action"}@users.noreply.github.com`,
|
|
gitHubRepository: !util_1.isNullOrUndefined(core_1.getInput("REPOSITORY_PATH"))
|
|
? core_1.getInput("REPOSITORY_PATH")
|
|
: repository && repository.full_name
|
|
? repository.full_name
|
|
: process.env.GITHUB_REPOSITORY,
|
|
gitHubToken: core_1.getInput("GITHUB_TOKEN"),
|
|
name: !util_1.isNullOrUndefined(core_1.getInput("GIT_CONFIG_NAME"))
|
|
? core_1.getInput("GIT_CONFIG_NAME")
|
|
: pusher && pusher.name
|
|
? pusher.name
|
|
: process.env.GITHUB_ACTOR
|
|
? process.env.GITHUB_ACTOR
|
|
: "GitHub Pages Deploy Action",
|
|
targetFolder: core_1.getInput("TARGET_FOLDER"),
|
|
workspace: process.env.GITHUB_WORKSPACE || "",
|
|
root: "."
|
|
};
|