I studied different ways to deploy sites using git and found the following tutorial:
http://42pixels.com/blog/quick-and-dirty-git-deployment
I like the ideas presented in this tutorial and I will strive to use it for my sites, but it does not seem to support submodules.
In any case, can this be changed so that the submodules are also retracted and updated as necessary?
Thanks.
UPDATE
I have been working on this issue for the last couple of hours, and I seem to be making progress, but I still can't get it to work.
I switched to this tutorial: http://toroid.org/ams/git-website-howto (this is basically the same, with just a few minor changes), and after following some tips found here: https://stackoverflow.com/a/3/2/2/ 473360 / ... I ended up with a post-receive file that looks like this:
#!/bin/sh export GIT_WORK_TREE=/srv/www/limeblast.co.uk/htdocs_test export GIT_DIR=/srv/www/limeblast.co.uk/.git cd $GIT_WORK_TREE git checkout -f master git submodule init git submodule update
All this seems perfect in theory, and it would seem that the submodular commands are running, but I get the following error messages:
remote: Submodule 'wordpress' (git: //github.com/WordPress/WordPress.git) registered for the path 'wordpress' remote: Submodule 'wp-content / themes / limeblastevolution / inc / cssCrush' (git: // github .com / peteboere / css-crush.git) registered for the path 'wp-content / themes / limeblastevolution / inc / cssCrush' remote: fatal: working tree '/srv/www/limeblast.co.uk/htdocs_test' already exists . remote: Clone of git: //github.com/WordPress/WordPress.git 'the submodule path "wordpress" failed
Any ideas? Thanks.
source share