I always felt cap was overboard for my needs, so I tossed a simple script on
my server: https://gist.github.com/4c4e2a90985ce6b965e6
I then added an alias in my bash config that ssh'd to the server and
executed the script there when I wanted to deploy.  Now, mind you, I was
always pulling in master.  If you want to only use tags you're probably
better off using `git fetch origin` and `git reset --hard TAG_NAME_HERE`
 You would, of course, need to devise a way to pass the tag name to the
script, or use a branch name like "production" to mark where you want to
deploy at.

Also note, you probably don't want to clone every time, just pull or fetch.

    Tekkub
    Github General Support
    http://support.github.com/
    Join us on IRC: #github on freenode.net
    Discussion group: [email protected]

On Sun, Feb 8, 2009 at 11:01 AM, Bradley Wright <[email protected]> wrote:

>
> I'm currently not using Capistrano in one of my private repos, so I'm
> unsure of the steps required to deploy from GitHub. Maybe someone here
> can a) help me, and b) provide me with some best practices.
>
> Here's my scenario:
>
> - I have a private repo with tagged commits. I only *ever* want to
> release from tags (let's say 1.2);
> - I have a Ubuntu server with my own personal login, root, and a www-
> data user who owns the directories I deploy to;
>
> Attempts to deploy from GitHub as per the instructions seem to fail,
> as I've copied the RSA key from my own account, but I need to be the
> www-data user to overwrite the code in the actual website directory:
>
> $ cd /var/www/mysite
> $ sudo -u www-data git clone g...@username/mysite.git
>
> How do other people use this? And is there any way to clone directly
> from tags? Or do I have to check out the entire repo and then `git
> checkout` the tag?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GitHub" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/github?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to