<commit_before># ember-cli-deploy-ssh #

You should already have ember-cli-deploy installed but if you dont:

```
$ npm install --save-dev ember-cli-deploy
```

**Install**

```
$ npm install --save-dev ember-cli-deploy-ssh
```

In your `deploy.js `configuration, set `type` to `ssh` . Here's an example:

```js
// An example of deploy.js.

var developmentEnvironment = {
    // Omitted, see stagingEnvironment below.
};

var stagingEnvironment = {
  store: {
    type: 'ssh', // the default store is 'redis', use 'ssh' for this addon.
    remoteDir: process.env['APP_STAGING_REMOTE_DIR_PATH'],
    host: process.env['APP_STAGING_REMOTE_HOST_IP'],
    username: process.env['APP_STAGING_REMOTE_USERNAME'],
    privateKeyFile: process.env['APP_STAGING_REMOTE_PRIVATE_KEY']
  },
  assets: {
    /* Handle your assets here. I recommmend using 'ember-cli-deploy-s3' */
  }
};

var productionEnvironment = {
    // Omitted, see stagingEnvironment above.
};

module.exports = {
  development: developmentEnvironment,
  staging: stagingEnvironment,
  production: productionEnvironment
};

```


> This project is based on this great repo: https://github.com/treyhunner/ember-deploy-ssh-index. Though, it's been modified to be serve a different purpose, lets give credit to where credit is due. On a related note, bug fixes and improvements will be pulled from upstream whenever possible.

## Directory Structure ##

The following directory structure is created on your server. The basic gist is that your revisions will be stored inside of their own directory along with meta data about the revision (date of commit, commit message, author of the commit, and commit hash). Information about your revisions is viewable via the following command `ember deploy:list -e <your environment>`. Output will look like this:

```sh

The following revisions were found:

    Revision: f6b1807
    Date: Fri May 1 02:16:12 2015 -0400
    Commit: <PASSWORD>
        Update comments in Brocfile for better documentation.
    Author: <NAME> <<EMAIL>>
    Activate: ember deploy:activate -r f6b1807 -e <environment>
    Preview: http://www.domain.com/rev/f6b1807

    Revision: d188a58
    Date: Fri May 1 02:16:12 2015 -0400
    Commit: <PASSWORD>
        A whole new readme.
    Author: <NAME> <<EMAIL>>
    Activate: ember deploy:activate -r f6b1807 -e <environment>
    Preview: http://www.domain.com/rev/f6b1807

```

```
# In your server's file directory...

/revision:abc123/
    index.html           # The index file
    revision.json        # Meta data about this revision

/revision:def456/
    ...

index.html --> /revision:abc123/index.html  # Active symlink

```<commit_msg>Update readme with instructions.<commit_after># ember-cli-deploy-ssh #

You should already have ember-cli-deploy installed but if you dont:

```
$ npm install --save-dev ember-cli-deploy
```

**Install**

```
$ npm install --save-dev ember-cli-deploy-ssh
```

In your `deploy.js `configuration, set `type` to `ssh` . Here's an example:

```js
// An example of deploy.js.

var developmentEnvironment = {
    // Omitted, see stagingEnvironment below.
};

var stagingEnvironment = {
  store: {
    type: 'ssh', // the default store is 'redis', use 'ssh' for this addon.
    remoteDir: process.env['APP_STAGING_REMOTE_DIR_PATH'],
    host: process.env['APP_STAGING_REMOTE_HOST_IP'],
    username: process.env['APP_STAGING_REMOTE_USERNAME'],
    privateKeyFile: process.env['APP_STAGING_REMOTE_PRIVATE_KEY']
  },
  assets: {
    /* Handle your assets here. I recommmend using 'ember-cli-deploy-s3' */
  }
};

var productionEnvironment = {
    // Omitted, see stagingEnvironment above.
};

module.exports = {
  development: developmentEnvironment,
  staging: stagingEnvironment,
  production: productionEnvironment
};

```

## Directory Structure ##

The following directory structure is created on your server. The basic gist is that your revisions will be stored inside of their own directory along with meta data about the revision (date of commit, commit message, author of the commit, and commit hash). Information about your revisions is viewable via the following command `ember deploy:list -e <your environment>`.

**List revisions**

```sh
$ ember deploy:list -e staging
```

```sh

The following revisions were found:

   Revision:  516d6e2
   Commit:    516d6e26bcb7e75c2620eae87eeb37ce1e481f8f
   Author:    <NAME> <<EMAIL>>
   Date:      Mon May 11 23:23:53 2015 -0400
   Message:   Hello-added
   Filepath:  /home/eddie/html/516d6e2/meta.json


   Revision:  d821149
   Commit:    d8211495be55c3e8b839ab963d9fec1910a44b05
   Author:    <NAME> <<EMAIL>>
   Date:      Fri May 1 08:17:40 2015 -0400
   Message:   Update-comments-in-Brocfile-for-better-documentation
   Filepath:  /home/eddie/html/d821149/meta.json

```

**Deploy revision**

```sh
$ ember deploy -e staging
```

```
# In your server's file directory...

abc123/
    index.html           # The index file
    meta.json            # Meta data about this revision

def456/
    ...

index.html --> abc123/index.html  # Active symlink

```

**Activate revision**

```sh
$ ember deploy:activate -e staging -r <revisionId>
```


> This project is based on this repo: https://github.com/treyhunner/ember-deploy-ssh-index. Though, it's been heavily modified to serve a different purpose -credit where credit is due.
{'fraction_non_alphanumeric': 0.1104248549504024, 'fraction_numerical': 0.03387609956953023, 'mean_word_length': 3.583190394511149, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 26, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5638411', 'n_tokens_mistral': 1879, 'n_tokens_neox': 1656, 'n_words': 539}