• Stars
    star
    172
  • Rank 221,201 (Top 5 %)
  • Language
    Ruby
  • License
    MIT License
  • Created almost 15 years ago
  • Updated almost 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

git-deploy is a deployment tool to allow for quick and easy deployments based on the changes in a git repository.

git-deployΒΆ ↑

DescriptionΒΆ ↑

git-deploy is a deployment tool to allow for quick and easy deployments based on the changes in a git repository.

It was originally used to update multiple WordPress installations on shared hosting environments. Ideally Capistrano would have been the perfect tool, but generally shared hosting environments only allow for FTP access, which Capistrano does not support. Likewise rather than using a standard FTP program, when doing a deployment, I only need to upload the files that have been changed. This saves me both time and bandwidth.

I needed something like Capistrano, but simpler.

git-deploy supports deployment over SSH and FTP.

InstallationΒΆ ↑

git-deploy requires the Ruby gems net-ssh, net-sftp, net-scp.

You can install them like so:

sudo gem install net-ssh net-sftp net-scp

UsageΒΆ ↑

In the root directory of your source code, create a deploy.yml file.

Here is a sample code:

'ftp://example:[email protected]:21/path/to/installation':
  skip: false

You use the URI scheme to define the location of your installation. If you do not want to use the URI scheme, and instead use another identifier. Feel free to do so. Just enter the settings for the host like so:

'example':
  skip: false
  scheme: ftp
  user: example
  password: password
  host: example.com
  port: 21
  path: /path/to/installation
  overwrite_if_same_revision: true

Note: The port field is optional in both the URI scheme and the broken down options

Once you have done creating the deploy.yml, upload to your server a file called REVISION with the revision string for the current revision residing on the server

After you have commited your code to the repository. You can run

git deploy

Additional KeysΒΆ ↑

The configuration for a site has additional and optional options:

  • skip: true or false (default). Whether to skip the configuration

  • debug_mode: true or false (default). For FTP only. Outputs debugging information

  • passive: true or false (default). For FTP only. Enable passive connection.

  • local_path: string. Only consider files to upload in a particular local path.

How It WorksΒΆ ↑

git-deploy stores file called REVISION on your server inside the root path to your application. This file stores the current revision of your application residing on your server.

When you run a git deploy, git-deploy downloads the REVISION file, and checks to see what files are different between revisions and either upload the changed files or deletes them from the server.

TODOΒΆ ↑

  • Create a Ruby gem for the script. Sadly gem-deploy was taken.

More Repositories

1

gitbook-public

Public braindump of my public releasable thoughts.
22
star
2

meetups.build.my

Source code for build.my. Built in Serverless, AWS Lambda, API Gateway, DynamoDB, TypeScript, GraphQL
JavaScript
8
star
3

character-length

Test out character length/limit for different monitor resolutions
7
star
4

dotfiles

My configuration files
Vim Script
5
star
5

firebug_logger

FirebugLogger provides a convenient way for Ruby On Rails applciations to output logs to the Firebug JavaScript console.
5
star
6

sessionless_bots

Sessionless Bots is a Ruby on Rails plugins that prevents bots from being assigned a session
3
star
7

interview-preparation

Algorithms, Data Structures
TypeScript
3
star
8

xhp-twitter-bootstrap

PHP
2
star
9

AizattoFacebookBundle

Used with Symfony and FriendsOfSymfony's FacebookBundle
PHP
2
star
10

facebook-social-plugins

A demonstration of all the Facebook Social Plugins
2
star
11

lost-cities

TypeScript
2
star
12

discoverer

Discover details about a web site given the properties and tags on the site
Ruby
1
star
13

AizattoControllerResolverBundle

Used with Symfony
PHP
1
star
14

timestamp-js

Simple tool to help me create timestamps I regularly use
TypeScript
1
star
15

xhp

A common set of XHP code
PHP
1
star
16

typescript-playground

My playground for TypeScript and to see how it compiles into JavaScript
TypeScript
1
star
17

xrb

Ruby
1
star
18

gomon

Go
1
star
19

gitbook-summary

Serverless script to parse my gitbook SUMMARY.md to create a page for a "Table of Contents"
TypeScript
1
star
20

shipit-deploy-example

shipit and shipitfile.js example in TypeScript
TypeScript
1
star
21

healthcheck

Monitor a website and receive notifications if it goes down
Go
1
star
22

shopping

TypeScript
1
star
23

url-shortener

URL Shortener using: Node.js, Serverless, AWS Lambda, AWS DynamoDB
TypeScript
1
star
24

symfony

Symfony (http://www.symfony.com) using git submodules instead of deps
PHP
1
star