Deploya en app – Olika sätt

https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps
1. Logga in på VPS.
2. Skapa git init –bare i vps.
3. Gå till hooks, skapa filen post-receive
4. Lägg till följande

#!/bin/sh
git --work-tree=/var/www/domain.com --git-dir=/var/repo/site.git checkout -f

5. chmod +x post-receive
6. git remote add live ssh://user@mydomain.com/var/repo/site.git
7. git push live master

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s