mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-15 22:56:54 +08:00
* feat: Add disable_nojekyll and cname options * docs: Add cname and disable_nojekyll * chore: Add vim * chore(release): 3.3.0-0 * ci: Add codecov/codecov-action * refactor: Enhance warning message - Add .nojekyll file by default to only the master and gh-pages branches. When the file already exists, this action does nothing. - When we set other branches to publish_branch, this action does not add .nojekyll file. cf. https://github.com/peaceiris/actions-gh-pages/issues/112#issuecomment-589678269 Close #112 Co-authored-by: Daniel Himmelstein <daniel.himmelstein@gmail.com> Co-authored-by: Nicolas Vanhoren <nicolas.vanhoren@gmail.com>
56 lines
2.1 KiB
TypeScript
56 lines
2.1 KiB
TypeScript
import * as core from '@actions/core';
|
|
import {Inputs} from './interfaces';
|
|
|
|
function showInputs(inps: Inputs): void {
|
|
if (inps.DeployKey) {
|
|
core.info(`[INFO] DeployKey: true`);
|
|
} else if (inps.GithubToken) {
|
|
core.info(`[INFO] GithubToken: true`);
|
|
} else if (inps.PersonalToken) {
|
|
core.info(`[INFO] PersonalToken: true`);
|
|
}
|
|
|
|
core.info(`[INFO] PublishBranch: ${inps.PublishBranch}`);
|
|
core.info(`[INFO] PublishDir: ${inps.PublishDir}`);
|
|
core.info(`[INFO] ExternalRepository: ${inps.ExternalRepository}`);
|
|
core.info(`[INFO] AllowEmptyCommit: ${inps.AllowEmptyCommit}`);
|
|
core.info(`[INFO] KeepFiles: ${inps.KeepFiles}`);
|
|
core.info(`[INFO] ForceOrphan: ${inps.ForceOrphan}`);
|
|
core.info(`[INFO] UserName: ${inps.UserName}`);
|
|
core.info(`[INFO] UserEmail: ${inps.UserEmail}`);
|
|
core.info(`[INFO] CommitMessage: ${inps.CommitMessage}`);
|
|
core.info(`[INFO] TagName: ${inps.TagName}`);
|
|
core.info(`[INFO] TagMessage: ${inps.TagMessage}`);
|
|
core.info(`[INFO] DisableNoJekyll: ${inps.DisableNoJekyll}`);
|
|
core.info(`[INFO] CNAME: ${inps.CNAME}`);
|
|
}
|
|
|
|
export function getInputs(): Inputs {
|
|
const inps: Inputs = {
|
|
DeployKey: core.getInput('deploy_key'),
|
|
GithubToken: core.getInput('github_token'),
|
|
PersonalToken: core.getInput('personal_token'),
|
|
PublishBranch: core.getInput('publish_branch'),
|
|
PublishDir: core.getInput('publish_dir'),
|
|
ExternalRepository: core.getInput('external_repository'),
|
|
AllowEmptyCommit:
|
|
(core.getInput('allow_empty_commit') || 'false').toUpperCase() === 'TRUE',
|
|
KeepFiles:
|
|
(core.getInput('keep_files') || 'false').toUpperCase() === 'TRUE',
|
|
ForceOrphan:
|
|
(core.getInput('force_orphan') || 'false').toUpperCase() === 'TRUE',
|
|
UserName: core.getInput('user_name'),
|
|
UserEmail: core.getInput('user_email'),
|
|
CommitMessage: core.getInput('commit_message'),
|
|
TagName: core.getInput('tag_name'),
|
|
TagMessage: core.getInput('tag_message'),
|
|
DisableNoJekyll:
|
|
(core.getInput('disable_nojekyll') || 'false').toUpperCase() === 'TRUE',
|
|
CNAME: core.getInput('cname')
|
|
};
|
|
|
|
showInputs(inps);
|
|
|
|
return inps;
|
|
}
|