import{_ as i}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as a,a as n,o as e}from"./app-h9l50wZ_.js";const l={};function t(h,s){return e(),a("div",null,s[0]||(s[0]=[n(`<h1 id="styleguide-deployment" tabindex="-1"><a class="header-anchor" href="#styleguide-deployment"><span>Styleguide Deployment</span></a></h1><p>You can use the webhook template <code>webhook.conf.template</code> and the <code>deploy-styleguide.sh</code> script in <code>deployment/styleguide/</code> for an automatic deployment from a (github) webhook.</p><p>For this to work follow these steps (using alpine):</p><p>Setup webhook service</p><div class="language-sh line-numbers-mode" data-highlighter="shiki" data-ext="sh" data-title="sh" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">apk</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> add</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> webhook</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">cp</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> deployment/styleguide/hooks.json.template</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> deployment/styleguide/hooks.json</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">vi</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> deployment/styleguide/hooks.json</span></span>
<span class="line"><span style="--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic;"># adjust content of .github/webhooks/hooks.json</span></span>
<span class="line"><span style="--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic;"># replace all variables accordingly</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic;"># copy webhook service file</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">cp</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> deployment/styleguide/webhook.template</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> /etc/init.d/webhook</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">vi</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> /etc/init.d/webhook</span></span>
<span class="line"><span style="--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic;"># adjust content of /etc/init.d/webhook</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">chmod</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> +x</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> /etc/init.d/webhook</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">service</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> webhook</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> start</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">rc-update</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> add</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> webhook</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> boot</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Setup nginx</p><div class="language-sh line-numbers-mode" data-highlighter="shiki" data-ext="sh" data-title="sh" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">vi</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> /etc/nginx/http.d/default.conf</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic;"># contents of /etc/nginx/http.d/default.conf</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">server</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> {</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">    listen</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> 80</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> default_server</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">;</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">    listen</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;"> [::]:80 default_server;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">    root</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> /var/www/localhost/htdocs</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic;">    # The github payload is quite big sometimes, hence  those two lines can prevent an reoccurring error message on nginx</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">    client_body_buffer_size</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">     10M</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">;</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">    client_max_body_size</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">        10M</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">    location</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> /</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> {</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">        index</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> index.html</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">;</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">        try_files</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;"> $uri</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;"> $uri</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">/</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> /index.html</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">;</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">    }</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">    location</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> /hooks/</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> {</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">        proxy_http_version</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> 1.1</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">;</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">        proxy_set_header</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">   Upgrade</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;"> $http_upgrade</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">;</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">        proxy_set_header</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">   Connection</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> &#39;upgrade&#39;</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">;</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">        proxy_set_header</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">   X-Forwarded-For</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;"> $remote_addr</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">;</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">        proxy_set_header</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">   X-Real-IP</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">  $remote_addr</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">;</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">        proxy_set_header</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">   Host</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;"> $host</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">        proxy_pass</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">         http://127.0.0.1:9000/hooks/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">;</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">        proxy_redirect</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">     off</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">;</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">    }</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">}</span></span>
<span class="line"><span style="--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic;"># contents of /etc/nginx/http.d/default.conf</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">service</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> nginx</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> reload</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0A1A7;--shiki-light-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic;"># delete htdocs/ folder to allow creation of symlink</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">rm</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> -r</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> /var/www/localhost/htdocs</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>For the github webhook configure the following:</p><table><thead><tr><th>Field</th><th>Value</th></tr></thead><tbody><tr><td>Payload URL</td><td>https://styleguide.ocelot.social/hooks/github</td></tr><tr><td>Content type</td><td>application/json</td></tr><tr><td>Secret</td><td>A SECRET</td></tr><tr><td>SSL verification</td><td>Enable SSL verification</td></tr><tr><td>Which events would you like to trigger this webhook?</td><td>Send me everything.</td></tr><tr><td>Active</td><td>[x]</td></tr></tbody></table>`,9)]))}const k=i(l,[["render",t],["__file","index.html.vue"]]),r=JSON.parse('{"path":"/deployment/styleguide/","title":"Styleguide Deployment","lang":"en-US","frontmatter":{},"headers":[],"git":{"createdTime":1775351521000,"updatedTime":1775351521000,"contributors":[{"name":"dependabot[bot]","email":"49699333+dependabot[bot]@users.noreply.github.com","commits":1}]},"readingTime":{"minutes":0.7,"words":209},"filePathRelative":"deployment/styleguide/README.md","localizedDate":"April 5, 2026","excerpt":"\\n<p>You can use the webhook template <code>webhook.conf.template</code> and the <code>deploy-styleguide.sh</code> script in <code>deployment/styleguide/</code> for an automatic deployment from a (github) webhook.</p>\\n<p>For this to work follow these steps (using alpine):</p>\\n<p>Setup webhook service</p>"}');export{k as comp,r as data};
