File tree 2 files changed +21
-0
lines changed
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ inputs:
19
19
description : A deploy message
20
20
required : false
21
21
default : " "
22
+ debug :
23
+ description : When provided, prints more debug info in NETLIFY_OUTPUT
24
+ required : false
25
+ default : " "
22
26
build_directory :
23
27
description : Directory where built files are stored
24
28
required : true
@@ -43,6 +47,10 @@ inputs:
43
47
description : In monorepos, package to deploy
44
48
required : false
45
49
default : " "
50
+ command_extra_flags :
51
+ description : Any optional extra flags added to Netlify deploy command
52
+ required : false
53
+ default : " "
46
54
outputs :
47
55
NETLIFY_OUTPUT :
48
56
description : netlify command output
68
76
BUILD_COMMAND : ${{ inputs.build_command }}
69
77
DEPLOY_ALIAS : ${{ inputs.deploy_alias }}
70
78
MONOREPO_PACKAGE : ${{ inputs.monorepo_package }}
79
+ DEBUG : ${{ inputs.debug }}
80
+ COMMAND_EXTRA_FLAGS : ${{ inputs.command_extra_flags }}
71
81
72
82
branding :
73
83
icon : activity
Original file line number Diff line number Diff line change 25
25
export NETLIFY_SITE_ID=" ${NETLIFY_SITE_ID} "
26
26
export NETLIFY_AUTH_TOKEN=" ${NETLIFY_AUTH_TOKEN} "
27
27
28
+ # command based on https://cli.netlify.com/commands/deploy
28
29
COMMAND=" netlify deploy --dir=${BUILD_DIRECTORY} --functions=${FUNCTIONS_DIRECTORY} --message=\" ${NETLIFY_DEPLOY_MESSAGE} \" "
29
30
30
31
if [[ " ${NETLIFY_DEPLOY_TO_PROD} " == " true" ]]
40
41
COMMAND+=" --filter ${MONOREPO_PACKAGE} "
41
42
fi
42
43
44
+ if [[ -n " ${DEBUG} " ]]
45
+ then
46
+ COMMAND+=" --debug "
47
+ fi
48
+
49
+ if [[ -n " ${COMMAND_EXTRA_FLAGS} " ]]
50
+ then
51
+ COMMAND+=" ${COMMAND_EXTRA_FLAGS} "
52
+ fi
53
+
43
54
OUTPUT=$( sh -c " $COMMAND " )
44
55
45
56
# Set outputs
You can’t perform that action at this time.
0 commit comments