<commit_before># grunt-ssh-deploy-release

Create an archive of "localPath" (except excluded folders). 
Copy this archive to remote server using SCP. 
Decompress the release on remote server. 
Create "shared" folders symlink. 
Create release symlink. 
Clean temporary files and old releases.



## Installation

`npm install grunt-ssh-deploy-release`


## Grunt configuration
```js

grunt.config.set('ssh-deploy-release', {

	// Global options
	// ==============
    options: {

    	// Local folder to deploy
        localPath: 'www',

        // Excluded local folders
        exclude: [
            'tmp/**',
            'images/**',
        ],

        // Shared folders (use symlink)
        // Example : 'sharedFolder' : 'linkName'
        share: {
            'images': 'assets/images',
        }
    },


    // Environments
    // ============

    // Preproduction
    preproduction: {
        options: {
            host: 'hostname',
            username: 'username',
            password: 'password',
            deployPath: '/opt/path/to'
        }
    },

    // Production
    production: {
        options: {
            host: 'hostname',
            username: 'username',
            password: 'password',
            deployPath: '/opt/path/to'
        }
    }
});
```

## Usage

### Deploy to "environmentName"
`grunt ssh-deploy-release:environmentName`


## Options

### SCP connection

#### port
Port used to connect to remote server.
Default : 22

#### host
Remote server hostname.

#### username
Username used to connect to remote server.

#### password
Password used to connect to remote server.

#### deployPath
Absolute path on remote server where release will be deployed.

#### readyTimeout
SCP connection timeout duration.
Default : 20000

### Path
#### currentReleaseLink
Name of the current release symbolic link. Relative to `deployPath`.
Defaut : 'www'

#### sharedFolder
Name of the folder containing shared folders. Relative to `deployPath`.
Default : 'shared'

#### releasesFolder
Name of the folder containing releases. Relative to `deployPath`.
default : 'releases'

#### localPath
Name of the local folder to deploy.
Default : 'www'<commit_msg>Changed documentation<commit_after># grunt-ssh-deploy-release

Create an archive of "localPath" (except excluded folders). 
Copy this archive to remote server using SCP. 
Decompress the release on remote server. 
Create "shared" folders symlink. 
Create release symlink. 
Clean temporary files and old releases.



## Installation

`npm install grunt-ssh-deploy-release`


## Grunt configuration
```js

grunt.config.set('ssh-deploy-release', {

	// Global options
	// ==============
    options: {

    	// Local folder to deploy
        localPath: 'www',

        // Excluded local folders
        exclude: [
            'tmp/**',
            'images/**',
        ],

        // Shared folders (use symlink)
        // Example : 'sharedFolder' : 'linkName'
        share: {
            'images': 'assets/images',
        }
    },


    // Environments
    // ============

    // Preproduction
    preproduction: {
        options: {
            host: 'hostname',
            username: 'username',
            password: 'password',
            deployPath: '/opt/path/to'
        }
    },

    // Production
    production: {
        options: {
            host: 'hostname',
            username: 'username',
            password: 'password',
            deployPath: '/opt/path/to'
        }
    }
});
```

## Usage

### Deploy to "environmentName"
`grunt ssh-deploy-release:environmentName`


## Options

### SCP connection

#### port
Port used to connect to remote server.
Default : 22

#### host
Remote server hostname.

#### username
Username used to connect to remote server.

#### password
Password used to connect to remote server.

#### deployPath
Absolute path on remote server where release will be deployed.
Do not specify *currentReleaseLink* (or www folder) in this path.


#### readyTimeout
SCP connection timeout duration.
Default : 20000

### Path
#### currentReleaseLink
Name of the current release symbolic link. Relative to `deployPath`.
Defaut : 'www'

#### sharedFolder
Name of the folder containing shared folders. Relative to `deployPath`.
Default : 'shared'

#### releasesFolder
Name of the folder containing releases. Relative to `deployPath`.
default : 'releases'

#### localPath
Name of the local folder to deploy.
Default : 'www'
{'fraction_non_alphanumeric': 0.12547871142149133, 'fraction_numerical': 0.0031538634827663887, 'mean_word_length': 2.5238095238095237, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 7, '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': '2288576', 'n_tokens_mistral': 1267, 'n_tokens_neox': 1179, 'n_words': 408}