Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Wdrożenia umożliwiają udostępnienie społecznościowego oprogramowania sprzęgającego do użycia i testowania. Wdrożenie z nagłówka jest tworzone domyślnie w Apps Script i zawsze zawiera bieżącą działającą wersję kodu. Możesz jednak mieć dodatkowe wdrożenia oparte na osobnych wersjach społecznościowego oprogramowania sprzęgającego.
Na przykład oprócz wdrożenia Head musisz mieć wdrożenie Test i produkcyjne. Dzięki temu możesz mieć pewność, że użytkownicy otrzymają stabilną i testowaną wersję oprogramowania sprzęgającego.
Przechowywanie różnych wersji kodu
Podczas tworzenia społecznościowego oprogramowania sprzęgającego w Apps Script musisz utrzymywać osobne wersje kodu oprogramowania sprzęgającego na potrzeby produkcji i programowania. Musisz też dowiedzieć się, jak wdrażać różne wersje.
Aby zarządzać różnymi wersjami projektu Apps Script, zapoznaj się z dokumentacją wersji Apps Script.
Jeśli publikujesz lub udostępniasz oprogramowanie sprzęgające innym użytkownikom, być może warto udostępnić w przyszłości poprawki i aktualizacje. Aby to zrobić, edytuj istniejące wdrożenie na liście wdrożeń i wybierz wersję, którą chcesz wdrożyć.
Dzięki temu użytkownicy nie będą musieli wykonywać żadnych dodatkowych czynności i otrzymają aktualizację automatycznie.
Sprawdzona metoda: utwórz osobne wdrożenia HEAD, Testowe i produkcyjne
Wdrożenie najnowszej wersji (HEAD) zawsze będzie zawierać najnowszą wersję kodu. Tego wdrożenia należy używać tylko do programowania. Oprócz wdrożenia HEAD musisz mieć wdrożenie Testowe i produkcyjne. Podczas tworzenia oprogramowania sprzęgającego zachowaj przyrostowe wersje kodu, a następnie przypisz odpowiednie wersje do wdrożeń testowych i produkcyjnych.
[null,null,["Ostatnia aktualizacja: 2025-07-25 UTC."],[[["\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."]]