1 [[!meta title="Laptop Ikiwiki extended"]]
3 I have (at least) three different hosts, `laptop`, `gitserver`, and `webserver`.
5 1. I started by following [[/tips/laptop_wiki_with_git]] to create
6 a bare repo on `gitserver`, and clone that to a workingdir on gitserver.
8 On the laptop clone gitserver:repo /working/dir
10 Next create a setup file for the laptop with
12 gitorigin_branch=> "",
13 git_wrapper => "/working/dir/.git/hooks/post-commit",
15 At this point, assuming you followed page above, and not my hasty summary,
19 should rebuild the output of your wiki.
21 2. Now create a setup file for the server (I call it server.setup).
23 gitorigin_branch=> "origin",
24 git_wrapper => "/repo/wiki.git/hooks/post-update.ikiwiki"
26 Note the non-standard and bizzare name of the hook.
28 edit /repo/wiki.git/hooks/post-update so that it looks something like
30 /repo/wiki.git/hooks/post-update.ikiwiki
31 rsync -cavz /home/me/public_html/* webserver:/destdir
35 ikiwiki --setup server.setup
37 Now in principle when you run git push on the laptop, the git server will
38 first do its "regular" thing and update ~/public_html (in my case) and
39 then rsync it onto the webserver. For this to work, you need passwordless
40 ssh or something like it.