<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Laptop Ikiwiki extended</title> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" href="../style.css" type="text/css" /> <link rel="stylesheet" href="../local.css" type="text/css" /> </head> <body> <div class="page"> <div class="pageheader"> <div class="header"> <span> <span class="parentlinks"> <a href="../index.html">ikiwiki</a>/ <a href="../tips.html">tips</a>/ </span> <span class="title"> Laptop Ikiwiki extended </span> </span> </div> </div> <div id="pagebody"> <div id="content" role="main"> <p>I have (at least) three different hosts, <code>laptop</code>, <code>gitserver</code>, and <code>webserver</code>.</p> <ol> <li><p>I started by following <a href="./laptop_wiki_with_git.html">laptop wiki with git</a> to create a bare repo on <code>gitserver</code>, and clone that to a workingdir on gitserver.</p> <p>On the laptop clone gitserver:repo /working/dir </p> <p>Next create a setup file for the laptop with </p> <pre><code>gitorigin_branch=> "", git_wrapper => "/working/dir/.git/hooks/post-commit", </code></pre> <p>At this point, assuming you followed page above, and not my hasty summary, </p> <pre><code>git commit -a </code></pre> <p>should rebuild the output of your wiki.</p></li> <li><p>Now create a setup file for the server (I call it server.setup).</p> <pre><code>gitorigin_branch=> "origin", git_wrapper => "/repo/wiki.git/hooks/post-update.ikiwiki" </code></pre> <p>Note the non-standard and bizzare name of the hook. </p> <p>edit /repo/wiki.git/hooks/post-update so that it looks something like</p> <pre><code>/repo/wiki.git/hooks/post-update.ikiwiki rsync -cavz /home/me/public_html/* webserver:/destdir </code></pre> <p>Run </p> <pre><code>ikiwiki --setup server.setup </code></pre></li> </ol> <p>Now in principle when you run git push on the laptop, the git server will first do its "regular" thing and update ~/public_html (in my case) and then rsync it onto the webserver. For this to work, you need passwordless ssh or something like it.</p> <p><span class="createlink">DavidBremner</span></p> </div> </div> <div id="footer" class="pagefooter" role="contentinfo"> <div id="pageinfo"> <div class="pagedate"> Last edited <span class="date">Tue Feb 26 23:01:54 2019</span> <!-- Created <span class="date">Mon Mar 3 13:21:04 2008</span> --> </div> </div> <!-- from ikiwiki --> </div> </div> </body> </html>