0

I'm wondering if I can configure a remote FTP branch in git so that I can just push to github and then push to deployment right after one another.

If I could, this would be awesome.

Otherwise, what other options are there for quick and easy deployment? Can git use ssh or anything like that? My host is SDF.org, and you can see the options they offer to validated users here: http://sdf.org?join

wwaawaw
  • 6,867
  • 9
  • 32
  • 42

1 Answers1

1

I am using another approach for deployment of my files over ssh/ftp: instead of using a git push, I pack the wanted files as a .tar.gz archive and upload that using scp or the corresponding ftp commands. See the section "The Hook" in my blog entry. There, I find all wanted files using find and pack them using tar:

find . -name "*.html" -o -name "*.css" -o -name "*.js" | tar -czf archive.tgz --files-from -

After doing that, you can simply upload the file using scp and unpack with a command over ssh:

scp archive.tgz mamuelle@g<domain>:~/.public_html/
ssh mamuelle@<domain> tar xfz .public_html/archive.tgz -C .public_html

You can do the same thing using ftp. Check out the corresponding manual on how to upload files to ftp.

What I described above can be started automatically using hooks. I use it with post-merge, for example.

Another option is described in this answer. There are simple shell scripts to upload a file via git-push.

edit With ssh, you can also directly push to a bare remote repository.

Community
  • 1
  • 1
evnu
  • 6,450
  • 2
  • 27
  • 38