Łukasz
Łukasz

Reputation: 11

Copying Subversion commit files to a live website

I'm trying to setup a test copy of my website on a server independent to the main one.

This server is hosted by nazwa.pl. I have the subversion server already setup there and I am able to make commits, updates etc.

My website runs from the "/" directory, and my repo is setup in "/.svnrepo/repo_name".

What I would like to do is to copy new files after every commit to a directory of a live website. How do I achieve that?

Upvotes: 1

Views: 77

Answers (2)

Łukasz
Łukasz

Reputation: 11

Thanks to the http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.checkout.html I've found a solution.

All I had to do was to use a post-commit hook file, where I put the command mentioned above.

Upvotes: 0

alroc
alroc

Reputation: 28144

First order of business, get your repository out of that directory. Your repository database should not be exposed so readily to regular web visitors.

Updating a website managed by Subversion is such a common request that it's addressed in the Subversion FAQ. Another option not mentioned by the FAQ is using a Continuous Delivery solution.

Upvotes: 1

Related Questions