Nicholas Ding: It's really a bad idea to write a post-commit hook for deployment.
Aar: And what are your reasons? It's not so bad to check your site, what you have committed? What are your arguments????
I have to agree with Nicholas Ding. The problem is that while you're doing your deployment via the post-commit hook, your developer is waiting for the commit to finish. If your deployment is taking only 30 seconds to complete, that's 30 seconds the developer is waiting for your post-commit hook to complete.
What do you think is going to happen if every time a developer commits a file, they have to wait 30 seconds for that commit to finish? What do you think they're going to think of Subversion, the development process in general, and you as the CM? Doing your deployment as a post-commit hook is not exactly a career enhancing move.
I suggest you look at Jenkins. Jenkins is what is called a Continuous Build System. You can set up Jenkins, so that every time a developer does a commit, Jenkins will do a build. This way, you're not tying up Subversion while your deployment is taking place.
The nice thing is that Jenkins can do your deployments too. And, if the deployment fails, it can email the developer who did the commit. Jenkins could even run some tests for you. For example, maybe your deployment worked, but the changed code results in an error. That might be nice to detect. And, you can store your deployable artifact in Jenkins in case you want to test it before deploying. If the testing works, You can go back to that build in Jenkins, click on a button, and do the deployment.
As another bonus, Jenkins allows your developers can see the history of all changes, builds, and deployments. It can also show you the history of all testing once you start testing. If you use an issue tracking system like Jira, Bugzilla, MantisBF, Track, or any number of other popular ones, Jenkins can integrate with those systems to help you track which build a particular issue was handled.
Even if you don't have to compile anything (let's say your entire webpage is just PHP files and JavaScripts), you can use Jenkins just for deployments and testing and still see a lot of benefit from it.
Jenkins is a great piece of software that can really improve your development process and handle your issue without slowing down Subversion. Plus, Jenkins is so easy to use, that it's probably quicker using Jenkins than figuring out how to do what you want in a post-commit hook anyway.