Deployment 可讓您使用及測試社群連接器。根據預設,Head Deployment 會在 Apps Script 中建立,且一律會包含程式碼目前的可運作版本。不過,您可以依據社群連接器的個別版本進行其他部署作業。舉例來說,除了 Head 部署作業外,您也應進行 Test 部署和 Production 部署作業。這有助於確保向使用者發布連接器的穩定測試版本。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eDeployments make your Community Connector available for use and testing, with the Head Deployment automatically containing the latest code version.\u003c/p\u003e\n"],["\u003cp\u003eMaintaining separate versions for production and development, along with understanding deployment management, is crucial for connector stability.\u003c/p\u003e\n"],["\u003cp\u003eCreating separate deployments like Test and Production, in addition to the Head deployment, ensures a controlled release process.\u003c/p\u003e\n"],["\u003cp\u003eUpdates to existing deployments can be made by editing the deployment and selecting the desired version, automatically updating for users.\u003c/p\u003e\n"],["\u003cp\u003eUtilizing version control within Apps Script and following deployment best practices provides a stable and efficient connector development workflow.\u003c/p\u003e\n"]]],[],null,["# Deploy a Community Connector\n\nDeployments allow you to make your Community Connector available to use and\ntest. The Head Deployment is created by default in Apps Script and will always\ncontain the current working version of the code. However, you can have\nadditional deployments based on separate versions of your Community Connector.\nFor example, in addition to the *Head* deployment, you should have a *Test*\ndeployment and a *Production* deployment. This helps to ensure a stable and\ntested version of your connector is released to users.\n\nMaintain different versions of your code\n----------------------------------------\n\nAs you develop your Community Connector in Apps Script, you should maintain\nseparate versions of your connector code for production and development. You\nshould also become familiar with how to deploy different versions.\n\nTo maintain different versions of the Apps Script project, please see the\n[Versions documentation](/apps-script/guides/versions) for Apps Script.\n\nCreate separate deployments\n---------------------------\n\nFor instructions to create deployments, see [Create a versioned deployment](/apps-script/concepts/deployments#create_a_versioned_deployment).\n\nAdd updates to an existing deployment\n-------------------------------------\n\nIf you are publishing or sharing your connector with other users, you might want\nto provide patches or updates in the future. To do so, **Edit** the existing\ndeployment in the deployments list and choose the version you want to deploy.\nThis way, the users do not have to do anything additional and will receive the\nupdate automatically.\n\nFor instructions to edit deployments, see [Edit a versioned deployment](/apps-script/concepts/deployments#edit_a_versioned_deployment).\n\n| **Note:** If the connector's creator is using a Google Workspace account, the connector will have to be deployed from an account on the same domain. Consumer (e.g. gmail.com) accounts or Google Workspace accounts of a different domain will not be able to update deployments.\n\nBest practice: keep separate HEAD, Test and Production deployments\n------------------------------------------------------------------\n\nThe *Latest Version (HEAD)* deployment will always contain the latest version of\nthe code. This deployment should be used for development purposes only. In\naddition to the *HEAD* deployment, you should have a *Test* deployment and a\n*Production* deployment. As you develop your connector, maintain incremental\nversions of your code and then assign appropriate versions to the *Test* and\n*Production* deployments."]]