MCPcopy Index your code
hub / github.com/serverless/serverless / deploy

Method deploy

packages/engine/src/index.js:275–292  ·  view source on GitHub ↗

* Runs Serverless Engine Deploy * @param {Object} options - The options object * @param {boolean} [options.force=false] - Force deployment even if no changes detected * @returns {Promise } - Returns the updated state

({ force = false } = {})

Source from the content-addressed store, hash-verified

273 * @returns {Promise<Object>} - Returns the updated state
274 */
275 async deploy({ force = false } = {}) {
276 // Load state
277 await this.#state.load()
278
279 // Run deploy and get the updated state
280 await this.#deploymentTypeInstance.deploy({ force })
281
282 // On successful deployment..
283 this.#state.state.timeLastDeployed = new Date().toISOString()
284 this.#state.state.isDeployed = true
285 // ONLY save new project config in state if deployment was successful
286 this.#state.state.config = this.#projectConfig
287
288 // Save the state
289 await this.#state.save()
290
291 return this.#state.state
292 }
293
294 /**
295 * Runs Serverless Containers Dev Mode

Callers 1

e2e.test.jsFile · 0.45

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected