{"result":{"depiction_url":null,"edges":{"subject":{"objects":[{"created":"2026-09-09T13:47:41Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:47:41Z","object_id":{"id":2566,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_operator","title":"Operator","uri":"https:\/\/zotonic.com\/id\/2566"},"seq":2},{"created":"2026-09-09T13:47:41Z","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":3},{"created":"2026-09-09T13:47:41Z","object_id":{"id":2631,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_database","title":"Database","uri":"https:\/\/zotonic.com\/id\/2631"},"seq":4},{"created":"2026-09-09T13:47:41Z","object_id":{"id":2635,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_module","title":"Module","uri":"https:\/\/zotonic.com\/id\/2635"},"seq":5},{"created":"2026-09-09T13:47:41Z","object_id":{"id":2658,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_migrate","title":"Migrate","uri":"https:\/\/zotonic.com\/id\/2658"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":2207,"is_a":["text","documentation","reference","module"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2207"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_module_mod_site_update","page_url":{"en":"https:\/\/zotonic.com\/docs\/2207\/mod_site_update","x-default":"https:\/\/zotonic.com\/docs\/2207\/mod_site_update"},"preview_url":null,"resource":{"version":3629,"pivot_location_lat":null,"title":"mod_site_update","is_authoritative":true,"body":"<p>This module pulls updates of a site‘s code from a remote version control system. The supported version control systems\nare git and mercurial.<\/p>\n<p>After enabling this module you will see a button <strong>Update site<\/strong> on the System -&gt; Status page in the admin.<\/p>\n<p>This button is only available to users with the <em>use.mod_site_update<\/em> right.<\/p>\n<p>After a pull of new code, Zotonic will do everything that is needed. Including compilation of source code, reloading of\ndispatch rules, reloading of translations and reindexing the template directories.<\/p>\n<p>This update of the system can take a while.<\/p>\n<h2>Webhook<\/h2>\n<p>In GitHub and other systems it is possible to set a <em>webhook<\/em> that is called when new updates are pushed to the repository.<\/p>\n<p>In System &gt; Modules there is a <em>Config<\/em> button next to the mod_site_update module. Click this and configure a secure\ntoken to be passed to the webhook.<\/p>\n<p>The URL for GitHub et al is:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">https:\/\/yoursite.test\/api\/model\/site_update\/post\/webhook\/&lt;token&gt;\n<\/code><\/pre>\n<p>Where <code>&lt;token&gt;<\/code> should be replaced with your configured token.<\/p>\n<p>The token is saved in the config key <code>mod_site_update.webhook_token<\/code>.<\/p>\n<p>Ensure that the external system performs a HTTP POST to the webhook, the posted body is dropped.<\/p>\n<h2>Zotonic status site<\/h2>\n<p>The <code>mod_site_update<\/code> module is also used by the zotonic status site.<\/p>\n<p>Here the module adds buttons to update sites and a button to update the complete Zotonic system.<\/p>\n<p>Site updates get their datamodel fixed by automatic restarts of modules, ensure that you increment the\n<code>-mod_schema(...)<\/code> version number.<\/p>\n<p>Zotonic updates are a bit more complicated. Small updates will be fine. Large updates that also change the datamodel or\nadd new Erlang dependencies need more compilation and a system restart. So be careful with using this update button.<\/p>\n<h2>Accepted Events<\/h2>\n<p>Delegate callbacks:<\/p>\n<ul><li><code>event\/2<\/code> with <code>postback<\/code> messages: <code>make<\/code>, <code>vcs_up<\/code>.<\/li><\/ul>","slug":"mod_site_update","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"a1dc4d8e8113a468021b81c3c3de8f0e69ee3c92c026ee3bddf099dc6d98249c","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":320,"is_a":["meta","category"],"name":"module","title":"Modules","uri":"https:\/\/test.zotonic.com\/id\/320"},"doc_source_path":"apps\/zotonic_mod_site_update\/src\/mod_site_update.erl","publication_start":"2023-06-24T08:18:01Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_site_update\/src\/mod_site_update.erl","pivot_location_lng":null,"doc_source_kind":"module","name":"doc_module_mod_site_update","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-12-12T11:50:45Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_site_update","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"66cb145eae7002b184e7d8c4c7bba5e53e8248e5\n","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-02T12:40:18Z","title_slug":"mod_site_update"},"uri":"https:\/\/zotonic.com\/id\/2207","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2207"}},"status":"ok"}