Skip to content

Commit ba14867

Browse files
committed
Deploy Production Code for Commit 432c473 πŸš€
1 parent 432c473 commit ba14867

File tree

169 files changed

+42553
-370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+42553
-370
lines changed

β€Žlib/constants.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface ActionInterface {
3333
name?: string;
3434
/** The repository path, for example JamesIves/github-pages-deploy-action. */
3535
repositoryName?: string;
36-
/** The fully qualified repositpory path, this gets auto generated if repositoryName is provided. */
36+
/** The fully qualified repository path, this gets auto generated if repositoryName is provided. */
3737
repositoryPath?: string;
3838
/** Wipes the commit history from the deployment branch in favor of a single commit. */
3939
singleCommit?: boolean | null;

β€Žlib/git.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
import { ActionInterface, Status } from './constants';
2+
/**
3+
* Initializes git in the workspace.
4+
*/
25
export declare function init(action: ActionInterface): Promise<void | Error>;
6+
/**
7+
* Runs the necessary steps to make the deployment.
8+
*/
39
export declare function deploy(action: ActionInterface): Promise<Status>;

β€Žlib/git.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ const constants_1 = require("./constants");
2020
const execute_1 = require("./execute");
2121
const worktree_1 = require("./worktree");
2222
const util_1 = require("./util");
23-
/* Initializes git in the workspace. */
23+
/**
24+
* Initializes git in the workspace.
25+
*/
2426
function init(action) {
2527
return __awaiter(this, void 0, void 0, function* () {
2628
try {
@@ -67,7 +69,9 @@ function init(action) {
6769
});
6870
}
6971
exports.init = init;
70-
/* Runs the necessary steps to make the deployment. */
72+
/**
73+
* Runs the necessary steps to make the deployment.
74+
*/
7175
function deploy(action) {
7276
return __awaiter(this, void 0, void 0, function* () {
7377
const temporaryDeploymentDirectory = 'github-pages-deploy-action-temp-deployment-folder';

β€Žlib/ssh.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
import { ActionInterface } from './constants';
2+
/**
3+
* Configures SSH for the workflow.
4+
*/
25
export declare function configureSSH(action: ActionInterface): Promise<void>;

β€Žlib/ssh.js

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ const io_1 = require("@actions/io");
1515
const child_process_1 = require("child_process");
1616
const fs_1 = require("fs");
1717
const util_1 = require("./util");
18+
/**
19+
* Configures SSH for the workflow.
20+
*/
1821
function configureSSH(action) {
1922
return __awaiter(this, void 0, void 0, function* () {
2023
try {

β€Žlib/util.d.ts

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,34 @@
11
import { ActionInterface } from './constants';
2+
/**
3+
* Utility function that checks to see if a value is undefined or not.
4+
* If allowEmptyString is passed the parameter is allowed to contain an empty string as a valid parameter.
5+
*/
26
export declare const isNullOrUndefined: (value: unknown) => value is "" | null | undefined;
7+
/**
8+
* Generates a token type used for the action.
9+
*/
310
export declare const generateTokenType: (action: ActionInterface) => string;
11+
/**
12+
* Generates a the repository path used to make the commits.
13+
*/
414
export declare const generateRepositoryPath: (action: ActionInterface) => string;
15+
/**
16+
* Generate absolute folder path by the provided folder name
17+
*/
518
export declare const generateFolderPath: (action: ActionInterface) => string;
19+
/**
20+
* Verifies the action has the required parameters to run, otherwise throw an error.
21+
*/
622
export declare const checkParameters: (action: ActionInterface) => void;
23+
/**
24+
* Suppresses sensitive information from being exposed in error messages.
25+
*/
726
export declare const suppressSensitiveInformation: (str: string, action: ActionInterface) => string;
27+
/**
28+
* Extracts message from an error object.
29+
*/
830
export declare const extractErrorMessage: (error: unknown) => string;
9-
/** Strips the protocol from a provided URL. */
31+
/**
32+
* Strips the protocol from a provided URL.
33+
*/
1034
export declare const stripProtocolFromUrl: (url: string) => string;

β€Žlib/util.js

+31-10
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,31 @@ const core_1 = require("@actions/core");
88
const fs_1 = require("fs");
99
const path_1 = __importDefault(require("path"));
1010
const constants_1 = require("./constants");
11-
/* Replaces all instances of a match in a string. */
11+
/**
12+
* Replaces all instances of a match in a string.
13+
*/
1214
const replaceAll = (input, find, replace) => input.split(find).join(replace);
13-
/* Utility function that checks to see if a value is undefined or not.
14-
If allowEmptyString is passed the parameter is allowed to contain an empty string as a valid parameter. */
15+
/**
16+
* Utility function that checks to see if a value is undefined or not.
17+
* If allowEmptyString is passed the parameter is allowed to contain an empty string as a valid parameter.
18+
*/
1519
const isNullOrUndefined = (value) => typeof value === 'undefined' || value === null || value === '';
1620
exports.isNullOrUndefined = isNullOrUndefined;
17-
/* Generates a token type used for the action. */
21+
/**
22+
* Generates a token type used for the action.
23+
*/
1824
const generateTokenType = (action) => action.sshKey ? 'SSH Deploy Key' : action.token ? 'Deploy Token' : '…';
1925
exports.generateTokenType = generateTokenType;
20-
/* Generates a the repository path used to make the commits. */
26+
/**
27+
* Generates a the repository path used to make the commits.
28+
*/
2129
const generateRepositoryPath = (action) => action.sshKey
2230
? `git@${action.hostname}:${action.repositoryName}`
2331
: `https://${`x-access-token:${action.token}`}@${action.hostname}/${action.repositoryName}.git`;
2432
exports.generateRepositoryPath = generateRepositoryPath;
25-
/* Genetate absolute folder path by the provided folder name */
33+
/**
34+
* Generate absolute folder path by the provided folder name
35+
*/
2636
const generateFolderPath = (action) => {
2737
const folderName = action['folder'];
2838
return path_1.default.isAbsolute(folderName)
@@ -32,12 +42,16 @@ const generateFolderPath = (action) => {
3242
: path_1.default.join(action.workspace, folderName);
3343
};
3444
exports.generateFolderPath = generateFolderPath;
35-
/* Checks for the required tokens and formatting. Throws an error if any case is matched. */
45+
/**
46+
* Checks for the required tokens and formatting. Throws an error if any case is matched.
47+
*/
3648
const hasRequiredParameters = (action, params) => {
3749
const nonNullParams = params.filter(param => !(0, exports.isNullOrUndefined)(action[param]));
3850
return Boolean(nonNullParams.length);
3951
};
40-
/* Verifies the action has the required parameters to run, otherwise throw an error. */
52+
/**
53+
* Verifies the action has the required parameters to run, otherwise throw an error.
54+
*/
4155
const checkParameters = (action) => {
4256
if (!hasRequiredParameters(action, ['token', 'sshKey'])) {
4357
throw new Error('No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. For more details on how to use an ssh deploy key please refer to the documentation.');
@@ -56,7 +70,9 @@ const checkParameters = (action) => {
5670
}
5771
};
5872
exports.checkParameters = checkParameters;
59-
/* Suppresses sensitive information from being exposed in error messages. */
73+
/**
74+
* Suppresses sensitive information from being exposed in error messages.
75+
*/
6076
const suppressSensitiveInformation = (str, action) => {
6177
let value = str;
6278
if ((0, core_1.isDebug)()) {
@@ -70,12 +86,17 @@ const suppressSensitiveInformation = (str, action) => {
7086
return value;
7187
};
7288
exports.suppressSensitiveInformation = suppressSensitiveInformation;
89+
/**
90+
* Extracts message from an error object.
91+
*/
7392
const extractErrorMessage = (error) => error instanceof Error
7493
? error.message
7594
: typeof error == 'string'
7695
? error
7796
: JSON.stringify(error);
7897
exports.extractErrorMessage = extractErrorMessage;
79-
/** Strips the protocol from a provided URL. */
98+
/**
99+
* Strips the protocol from a provided URL.
100+
*/
80101
const stripProtocolFromUrl = (url) => url.replace(/^(?:https?:\/\/)?(?:www\.)?/i, '').split('/')[0];
81102
exports.stripProtocolFromUrl = stripProtocolFromUrl;

β€Žlib/worktree.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ export declare class GitCheckout {
66
constructor(branch: string);
77
toString(): string;
88
}
9+
/**
10+
* Generate the worktree and set initial content if it exists
11+
*/
912
export declare function generateWorktree(action: ActionInterface, worktreedir: string, branchExists: unknown): Promise<void>;

β€Žlib/worktree.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ class GitCheckout {
3030
}
3131
}
3232
exports.GitCheckout = GitCheckout;
33-
/* Generate the worktree and set initial content if it exists */
33+
/**
34+
* Generate the worktree and set initial content if it exists
35+
*/
3436
function generateWorktree(action, worktreedir, branchExists) {
3537
return __awaiter(this, void 0, void 0, function* () {
3638
try {

β€Žnode_modules/.bin/uuid

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žnode_modules/@actions/core/lib/core.js

+17-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)