{"result":{"depiction_url":null,"edges":{"subject":{"objects":[{"created":"2026-11-02T11:45:06Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1000000},{"created":"2026-11-02T11:45:11Z","object_id":{"id":2562,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_site_administrator","title":"Site administrator","uri":"https:\/\/zotonic.com\/id\/2562"},"seq":1000000},{"created":"2026-11-02T11:45:32Z","object_id":{"id":2605,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_site_management","title":"Site management","uri":"https:\/\/zotonic.com\/id\/2605"},"seq":1000000},{"created":"2026-11-02T11:46:01Z","object_id":{"id":2658,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_migrate","title":"Migrate","uri":"https:\/\/zotonic.com\/id\/2658"},"seq":1000000},{"created":"2026-11-02T11:46:25Z","object_id":{"id":2691,"is_a":["categorization","keyword","keyword_quality"],"name":"zotonic_topic_maintainability","title":"Maintainability","uri":"https:\/\/zotonic.com\/id\/2691"},"seq":1000000}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"export_revision":11,"id":3133,"is_a":["text","documentation","developerguide"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/3133"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"developer_cmd_deploy","page_url":{"en":"https:\/\/zotonic.com\/docs\/3133\/deploy-pull-compile-and-activate-code","x-default":"https:\/\/zotonic.com\/docs\/3133\/deploy-pull-compile-and-activate-code"},"preview_url":null,"resource":{"version":11,"pivot_location_lat":null,"title":{"_type":"trans","tr":{"en":"deploy: Pull, compile and activate code"}},"is_authoritative":true,"body":{"_type":"trans","tr":{"en":"<h2>Syntax<\/h2>\n<pre class=\"notranslate\"><code class=\"notranslate language-text\">bin\/zotonic deploy [git-working-tree]<\/code><\/pre>\n<h2>Requirements and effects<\/h2>\n<p>Requires a reachable Zotonic node, Git, and a working tree with an upstream branch configured. Without an argument, the command deploys the Zotonic repository. Supply a path to deploy a separate site or module repository.<\/p>\n<p>The command waits for active schema migrations and pauses automatic file updates. It then runs <code>git pull --ff-only<\/code>, compiles the containing Zotonic installation, and activates changed Erlang modules together. Buffered file updates resume after successful deployment; site restarts and schema migrations continue through the normal module-manager queue.<\/p>\n<p><strong>Before pulling, the command restores the repository’s tracked <code>rebar.lock<\/code> from <code>HEAD<\/code>.<\/strong> This discards staged and unstaged changes to that file. Other local changes and untracked files are preserved, although conflicting changes can prevent the pull.<\/p>\n<p>Do not run concurrent pulls, external compilers, or manual code-loading commands during deployment. The deployment coordinates code activation and schema migrations on this node; it does not prevent visitors from seeing files change in the working tree.<\/p>\n<p>If pulling, compilation, or activation fails, the command reports an error and exits with a nonzero status. Fix the problem and run <code>bin\/zotonic update<\/code> to complete a full rebuild and resume buffered updates.<\/p>\n<h2>Example<\/h2>\n<pre class=\"notranslate\"><code class=\"notranslate language-sh\"># Deploy the Zotonic repository.\nbin\/zotonic deploy\n\n# Deploy a separate site repository.\nbin\/zotonic deploy \/path\/to\/site-repository<\/code><\/pre>\n<p>Run commands from the Zotonic workspace root. Replace the example path with the Git working tree to deploy. All sites or modules contained in that repository are updated together.<\/p>"}},"is_mailing_opt_out":false,"slug":"deploy-pull-compile-and-activate-code","is_protected":false,"visible_for":0,"tz":"Europe\/Amsterdam","language":["en"],"is_featured":false,"content_group_id":{"id":339,"is_a":["meta","content_group"],"name":"default_content_group","title":{"_type":"trans","tr":{"en":"Default Content Group"}},"uri":"https:\/\/zotonic.com\/id\/default_content_group"},"category_id":{"id":317,"is_a":["meta","category"],"name":"developerguide","title":"Developer guide","uri":"https:\/\/zotonic.com\/id\/developerguide"},"publication_start":"2026-11-02T11:41:00Z","is_website_redirect":false,"pivot_location_lng":null,"name":"developer_cmd_deploy","is_unfindable":false,"is_published":true,"summary":{"_type":"trans","tr":{"en":"Deploy the latest Git changes to a running Zotonic node."}},"pivot_geocode":null,"custom_slug":false,"created":"2026-11-02T11:41:00Z","uri":null,"date_is_all_day":false,"is_dependent":false,"is_page_path_multiple":false,"translation_status":{"en":""},"publication_end":"9999-08-17T12:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"creator_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"seo_noindex":false,"modified":"2026-11-02T11:46:25Z","title_slug":{"_type":"trans","tr":{"en":"deploy-pull-compile-and-activate-code"}}},"uri":"https:\/\/zotonic.com\/id\/3133","uri_template":"https:\/\/zotonic.com\/id\/:id","version":11,"websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/3133"}},"status":"ok"}