From a73e76d41f5af54d1cdff6ebdc7ec0cf9c3d9b6f Mon Sep 17 00:00:00 2001 From: Vlad Kyrylenko <39014816+vlkyrylenko@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:06:44 -0500 Subject: [PATCH] Add the new argument to the action (#3) --- action.yml | 4 ++++ src/get-url.ts | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 8dcf0cb..7855e4b 100644 --- a/action.yml +++ b/action.yml @@ -10,6 +10,10 @@ inputs: description: 'Download (if necessary) and use Hugo extended version. Example: true' required: false default: 'false' + withDeploy: + description: 'Select a version that deployment support enabled. Extended argument must be set to true. Example: true' + required: false + default: 'false' runs: using: 'node20' main: 'lib/index.js' diff --git a/src/get-url.ts b/src/get-url.ts index 0d12b57..08d8e32 100644 --- a/src/get-url.ts +++ b/src/get-url.ts @@ -17,9 +17,10 @@ export default function getURL( }; const deployStr = (deploy: string): string => { - if (deploy === 'true') { + if (deploy === 'true' && extended === 'true') { return 'withdeploy_'; - } else { + } + else { return ''; // } else { // throw new Error(`Invalid input (extended): ${extended}`);