Web site updates from subversion

It’s not rocket science, but it surprised me just how painlessly I could set up automatic web site updates from my subversion repository. It’s all documented out there on the net, but this is my chance to record how I manage this site.

My testing ground is a working directory. My published web site is a working directory. When I commit a change, the published site is automatically updated to the latest trunk code.

  • Set up the published site as a working directory:

    svn co file:///path-to-my-repo my-web-sitedir

  • Set up the post-commit hook (in /path/to/my-repo/hooks) to run ‘svn update /path/to/my-web-sitedir’. There are more details in the subversion FAQ

Of course, none of that fancy version control applies to these blog posts. Posts are in a database and there’s a plugin for managing versions.

This entry was posted in Software. Bookmark the permalink.