Add the new argument to the action (#3)

This commit is contained in:
Vlad Kyrylenko 2025-01-03 18:06:44 -05:00 committed by GitHub
parent 9182f4160b
commit a73e76d41f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -10,6 +10,10 @@ inputs:
description: 'Download (if necessary) and use Hugo extended version. Example: true' description: 'Download (if necessary) and use Hugo extended version. Example: true'
required: false required: false
default: '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: runs:
using: 'node20' using: 'node20'
main: 'lib/index.js' main: 'lib/index.js'

View File

@ -17,9 +17,10 @@ export default function getURL(
}; };
const deployStr = (deploy: string): string => { const deployStr = (deploy: string): string => {
if (deploy === 'true') { if (deploy === 'true' && extended === 'true') {
return 'withdeploy_'; return 'withdeploy_';
} else { }
else {
return ''; return '';
// } else { // } else {
// throw new Error(`Invalid input (extended): ${extended}`); // throw new Error(`Invalid input (extended): ${extended}`);