@jamesives/github-pages-deploy-action
Advanced tools
Comparing version 4.6.3 to 4.6.4
@@ -44,3 +44,3 @@ // Initial env variable setup for tests. | ||
repositoryPath: 'JamesIves/github-pages-deploy-action', | ||
folder: '.github/assets', | ||
folder: '.github/docs', | ||
branch: 'branch', | ||
@@ -66,3 +66,3 @@ token: '123', | ||
repositoryPath: 'JamesIves/github-pages-deploy-action', | ||
folder: '.github/assets', | ||
folder: '.github/docs', | ||
branch: 'branch', | ||
@@ -86,3 +86,3 @@ token: '123', | ||
hostname: 'github.com', | ||
folder: '.github/assets', | ||
folder: '.github/docs', | ||
branch: 'branch', | ||
@@ -89,0 +89,0 @@ token: null, |
@@ -31,3 +31,5 @@ "use strict"; | ||
const { pusher, repository } = github.context.payload; | ||
/* Flags to signal different scenarios to test cases */ | ||
/* | ||
* Flags to signal different scenarios to test cases | ||
*/ | ||
var TestFlag; | ||
@@ -34,0 +36,0 @@ (function (TestFlag) { |
import { ActionInterface, NodeActionInterface } from './constants'; | ||
/** Initializes and runs the action. | ||
* | ||
* @param {object} configuration - The action configuration. | ||
/** | ||
* Initializes and runs the action. | ||
*/ | ||
export default function run(configuration: ActionInterface | NodeActionInterface): Promise<void>; | ||
export default function run(configuration?: ActionInterface | NodeActionInterface): Promise<void>; |
@@ -18,5 +18,4 @@ "use strict"; | ||
const util_1 = require("./util"); | ||
/** Initializes and runs the action. | ||
* | ||
* @param {object} configuration - The action configuration. | ||
/** | ||
* Initializes and runs the action. | ||
*/ | ||
@@ -53,7 +52,7 @@ function run(configuration) { | ||
(0, core_1.info)('Checking configuration and starting deployment… 🚦'); | ||
const settings = Object.assign(Object.assign({}, configuration), { | ||
// Set the default branch for Node configurations | ||
branch: !(0, util_1.isNullOrUndefined)(configuration.branch) | ||
? configuration.branch | ||
: 'gh-pages' }); | ||
const settings = Object.assign(Object.assign({}, constants_1.action), configuration); | ||
// Sets the branch to the default value if it's not defined | ||
settings.branch = !(0, util_1.isNullOrUndefined)(settings.branch) | ||
? settings.branch | ||
: 'gh-pages'; | ||
// Defines the repository/folder paths and token types. | ||
@@ -60,0 +59,0 @@ // Also verifies that the action has all of the required parameters. |
@@ -6,5 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const constants_1 = require("./constants"); | ||
const lib_1 = __importDefault(require("./lib")); | ||
// Runs the action within the GitHub actions environment. | ||
(0, lib_1.default)(constants_1.action); | ||
(0, lib_1.default)(); |
@@ -5,3 +5,3 @@ { | ||
"author": "James Ives <iam@jamesiv.es> (https://jamesiv.es)", | ||
"version": "4.6.3", | ||
"version": "4.6.4", | ||
"license": "MIT", | ||
@@ -48,16 +48,16 @@ "main": "lib/lib.js", | ||
"@types/jest": "29.5.12", | ||
"@types/node": "20.14.9", | ||
"@typescript-eslint/eslint-plugin": "7.15.0", | ||
"@typescript-eslint/parser": "7.15.0", | ||
"eslint": "9.6.0", | ||
"@types/node": "20.14.11", | ||
"@typescript-eslint/eslint-plugin": "7.16.1", | ||
"@typescript-eslint/parser": "7.16.1", | ||
"eslint": "9.7.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-plugin-jest": "28.6.0", | ||
"eslint-plugin-prettier": "5.1.3", | ||
"eslint-plugin-prettier": "5.2.1", | ||
"jest": "29.7.0", | ||
"jest-circus": "29.7.0", | ||
"prettier": "3.3.2", | ||
"rimraf": "5.0.7", | ||
"ts-jest": "29.1.5", | ||
"prettier": "3.3.3", | ||
"rimraf": "6.0.1", | ||
"ts-jest": "29.2.3", | ||
"typescript": "5.5.3" | ||
} | ||
} |
@@ -50,3 +50,3 @@ <p align="center"> | ||
<p align="center"> | ||
<!-- sponsors --><a href="https://github.com/Chooksta69"><img src="https://github.com/Chooksta69.png" width="50px" alt="Chooksta69" /></a> <a href="https://github.com/MattWillFlood"><img src="https://github.com/MattWillFlood.png" width="50px" alt="MattWillFlood" /></a> <a href="https://github.com/jonathan-milan-pollock"><img src="https://github.com/jonathan-milan-pollock.png" width="50px" alt="jonathan-milan-pollock" /></a> <a href="https://github.com/raoulvdberge"><img src="https://github.com/raoulvdberge.png" width="50px" alt="raoulvdberge" /></a> <a href="https://github.com/robjtede"><img src="https://github.com/robjtede.png" width="50px" alt="robjtede" /></a> <a href="https://github.com/hadley"><img src="https://github.com/hadley.png" width="50px" alt="hadley" /></a> <a href="https://github.com/kevinchalet"><img src="https://github.com/kevinchalet.png" width="50px" alt="kevinchalet" /></a> <a href="https://github.com/Yousazoe"><img src="https://github.com/Yousazoe.png" width="50px" alt="Yousazoe" /></a> <a href="https://github.com/planetoftheweb"><img src="https://github.com/planetoftheweb.png" width="50px" alt="planetoftheweb" /></a> <a href="https://github.com/melton1968"><img src="https://github.com/melton1968.png" width="50px" alt="melton1968" /></a> <a href="https://github.com/szepeviktor"><img src="https://github.com/szepeviktor.png" width="50px" alt="szepeviktor" /></a> <a href="https://github.com/sckott"><img src="https://github.com/sckott.png" width="50px" alt="sckott" /></a> <a href="https://github.com/provinzkraut"><img src="https://github.com/provinzkraut.png" width="50px" alt="provinzkraut" /></a> <a href="https://github.com/electrovir"><img src="https://github.com/electrovir.png" width="50px" alt="electrovir" /></a> <a href="https://github.com/Griefed"><img src="https://github.com/Griefed.png" width="50px" alt="Griefed" /></a> <!-- sponsors --> | ||
<!-- sponsors --><a href="https://github.com/Chooksta69"><img src="https://github.com/Chooksta69.png" width="50px" alt="Chooksta69" /></a> <a href="https://github.com/MattWillFlood"><img src="https://github.com/MattWillFlood.png" width="50px" alt="MattWillFlood" /></a> <a href="https://github.com/jonathan-milan-pollock"><img src="https://github.com/jonathan-milan-pollock.png" width="50px" alt="jonathan-milan-pollock" /></a> <a href="https://github.com/raoulvdberge"><img src="https://github.com/raoulvdberge.png" width="50px" alt="raoulvdberge" /></a> <a href="https://github.com/robjtede"><img src="https://github.com/robjtede.png" width="50px" alt="robjtede" /></a> <a href="https://github.com/hadley"><img src="https://github.com/hadley.png" width="50px" alt="hadley" /></a> <a href="https://github.com/kevinchalet"><img src="https://github.com/kevinchalet.png" width="50px" alt="kevinchalet" /></a> <a href="https://github.com/Yousazoe"><img src="https://github.com/Yousazoe.png" width="50px" alt="Yousazoe" /></a> <a href="https://github.com/planetoftheweb"><img src="https://github.com/planetoftheweb.png" width="50px" alt="planetoftheweb" /></a> <a href="https://github.com/melton1968"><img src="https://github.com/melton1968.png" width="50px" alt="melton1968" /></a> <a href="https://github.com/szepeviktor"><img src="https://github.com/szepeviktor.png" width="50px" alt="szepeviktor" /></a> <a href="https://github.com/sckott"><img src="https://github.com/sckott.png" width="50px" alt="sckott" /></a> <a href="https://github.com/provinzkraut"><img src="https://github.com/provinzkraut.png" width="50px" alt="provinzkraut" /></a> <a href="https://github.com/electrovir"><img src="https://github.com/electrovir.png" width="50px" alt="electrovir" /></a> <a href="https://github.com/Griefed"><img src="https://github.com/Griefed.png" width="50px" alt="Griefed" /></a> <a href="https://github.com/MontezumaIves"><img src="https://github.com/MontezumaIves.png" width="50px" alt="MontezumaIves" /></a> <!-- sponsors --> | ||
</p> | ||
@@ -53,0 +53,0 @@ |
@@ -7,3 +7,5 @@ import {getInput} from '@actions/core' | ||
/* Flags to signal different scenarios to test cases */ | ||
/* | ||
* Flags to signal different scenarios to test cases | ||
*/ | ||
export enum TestFlag { | ||
@@ -10,0 +12,0 @@ NONE = 0, |
import {exportVariable, info, notice, setFailed, setOutput} from '@actions/core' | ||
import {ActionInterface, NodeActionInterface, Status} from './constants' | ||
import {action, ActionInterface, NodeActionInterface, Status} from './constants' | ||
import {deploy, init} from './git' | ||
@@ -14,8 +14,7 @@ import {configureSSH} from './ssh' | ||
/** Initializes and runs the action. | ||
* | ||
* @param {object} configuration - The action configuration. | ||
/** | ||
* Initializes and runs the action. | ||
*/ | ||
export default async function run( | ||
configuration: ActionInterface | NodeActionInterface | ||
configuration?: ActionInterface | NodeActionInterface | ||
): Promise<void> { | ||
@@ -55,9 +54,11 @@ let status: Status = Status.RUNNING | ||
const settings: ActionInterface = { | ||
...configuration, | ||
// Set the default branch for Node configurations | ||
branch: !isNullOrUndefined(configuration.branch) | ||
? configuration.branch | ||
: 'gh-pages' | ||
...action, | ||
...configuration | ||
} | ||
// Sets the branch to the default value if it's not defined | ||
settings.branch = !isNullOrUndefined(settings.branch) | ||
? settings.branch | ||
: 'gh-pages' | ||
// Defines the repository/folder paths and token types. | ||
@@ -64,0 +65,0 @@ // Also verifies that the action has all of the required parameters. |
@@ -1,5 +0,3 @@ | ||
import {action} from './constants' | ||
import run from './lib' | ||
// Runs the action within the GitHub actions environment. | ||
run(action) | ||
run() |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1538366
3201