@@ -28,7 +28,7 @@ export const deploySite = async (
2828 concurrentHash = DEFAULT_CONCURRENT_HASH ,
2929 concurrentUpload = DEFAULT_CONCURRENT_UPLOAD ,
3030 configPath = null ,
31- deployId : deployIdOpt = null ,
31+ deployId,
3232 deployTimeout = DEFAULT_DEPLOY_TIMEOUT ,
3333 draft = false ,
3434 filter,
@@ -37,8 +37,6 @@ export const deploySite = async (
3737 hashAlgorithm,
3838 manifestPath,
3939 maxRetry = DEFAULT_MAX_RETRY ,
40- // API calls this the 'title'
41- message : title ,
4240 siteEnv,
4341 siteRoot,
4442 skipFunctionsCache,
@@ -120,9 +118,9 @@ For more information, visit https://ntl.fyi/cli-native-modules.`)
120118 phase : 'start' ,
121119 } )
122120
123- let deploy
124- let deployParams = cleanDeep ( {
121+ const deployParams = cleanDeep ( {
125122 siteId,
123+ deploy_id : deployId ,
126124 body : {
127125 files,
128126 functions,
@@ -133,19 +131,11 @@ For more information, visit https://ntl.fyi/cli-native-modules.`)
133131 draft,
134132 } ,
135133 } )
136- if ( deployIdOpt === null ) {
137- if ( title ) {
138- deployParams = { ...deployParams , title }
139- }
140- deploy = await api . createSiteDeploy ( deployParams )
141- } else {
142- deployParams = { ...deployParams , deploy_id : deployIdOpt }
143- deploy = await api . updateSiteDeploy ( deployParams )
144- }
134+ let deploy = await api . updateSiteDeploy ( deployParams )
145135
146136 if ( deployParams . body . async ) deploy = await waitForDiff ( api , deploy . id , siteId , deployTimeout )
147137
148- const { id : deployId , required : requiredFiles , required_functions : requiredFns } = deploy
138+ const { required : requiredFiles , required_functions : requiredFns } = deploy
149139
150140 statusCb ( {
151141 type : 'create-deploy' ,
0 commit comments