Deployments

An Apps Script project deployment is a version of the script that is made available for use as a web app, add-on, or executable. By building and managing deployments, you can control the exact code version your users use. You can also maintain multiple deployments for production and development.

Deployments come in two varieties:

  • Head deployments, which are always synced to the current project code.
  • Versioned deployments, which are connected to a specific project version.

Head deployments

A head deployment makes the current project code available. The advantage of a head deployment is that it is always in sync with most recently saved code. Head deployments are valuable for rapidly testing code improvements, but are not recommended for public use of your add-on or web app.

When you create an Apps Script project, you automatically create a head deployment for that project.

Versioned deployments

In Apps Script, a version is a numbered snapshot of your code.

A versioned deployment makes a specific version of the project code available. This allows your users to continue to use a functioning version while you are making changes and improvements to the code. It is recommended that add-ons, web apps and other applications that are published for public consumption always use a versioned deployment.

Creating a versioned deployment

A versioned deployment requires a valid project manifest. See the Manifests guide for how to configure one.

Once you have configured the manifest, you can create a versioned deployment by following these steps:

  1. In the script editor, select the Publish > Deploy from manifest... menu item.
  2. In the resulting Deployments dialog, click Create.
  3. Select the version you wish to deploy, or select New to create a new version, and enter the Deployment name to serve as a label for this deployment.
  4. Click Save.
  5. Back in the Deployments dialog, the new deployment is listed.
  6. Click Close to exit the dialog.

Viewing deployments

At any time you can view the deployments of a project by selecting the Publish > Deploy from manifest... menu item.

Finding a deployment ID

Every deployment has an associated string ID automatically created for it. To see this ID, follow these steps:

  1. In the script editor, select the Publish > Deploy from manifest... menu item.
  2. Find the deployment in the deployment list.
  3. Click on the Get ID link for the deployment.

This shows the deployment ID in a new dialog.

Editing a versioned deployment

You can edit a versioned deployment if you need to, to change its name or version. You cannot edit a head deployment. To edit a deployment, follow these steps:

  1. In the script editor, select the Publish > Deploy from manifest... menu item.
  2. Find the deployment in the deployment list.
  3. Click on the Edit link for the deployment.
  4. Modify the deployment name, version, or manifest.
  5. Click Save.

When you want to deploy a change to the project code, create a new version and edit the deployment to use it. The new version is automatically used by any users that use that deployment.

Deleting a versioned deployment

You can delete a versioned deployment by following these steps:

  1. In the script editor, select the Publish > Deploy from manifest... menu item.
  2. Find the deployment in the deployment list.
  3. Click on the Delete link for the deployment.

Send feedback about...

Apps Script
Apps Script