This section will show you how to deploy your project on different environments.
## Setup
First of all you'll need to install [MobaXterm](https://mobaxterm.mobatek.net/download.html) in order to connect to the server.
Then, if your're on Linux you can skip the following section, otherwise if you are on Windows you'll have to install Windows Subsystem for Linux (WSL) since the deployment of the app is not working with windows commands.
## Configuration of MobaXterm
# Deploy
First open a new session and connect to the distant host. Don't forget to add the path to the private key in the advanced SSH settings. Also don't forget to ask an administrator to add your public key so you can access the server.
## Deploy Ecolyo
This section will show you how to deploy your project on different environments.
### Deploy version to builds branches
## Deploy build to builds branches
3 builds branch are today available for Ecolyo:
- build: reflect the build of the master branch and the version deployed in production environment
- build-dev: reflect the build of the dev branch and the version deployed on dev environment
- build-test reflect a temporary build which can be used for test purpose
#### Windows
-**build**: reflect the build of the master branch and the version deployed in production environment
-**build-dev**: reflect the build of the dev branch and the version deployed on dev environment
-**build-test**: reflect a temporary build which can be used for test purpose
If you use windows, make sure you have WSL installed and a Linux distribution. For more information about it see the [Install WSL section](../getting_started/setup_your_environment.md)
!!! info "Windows users"
Some command did not run on Windows. Please use your Linux distribution installed on your WSL. For more information about it see the [Install WSL section](../getting_started/setup_your_environment.md)
First open your Ubuntu terminal (or any other distribution you've installed), and clone the project in the repertory of your choice. Once you've selected the branch of you want to deploy, write the following command :
Make sure that:
```
yarn
yarn build
```
- you are on the right branch (dev or master) depending on the enviroment you need to deploy.
- your branch is up to date
- you node modules are up to date
After this, you can launch the deployment using the command linked to the target branch.
First build the application :
```
# deploy on build-test branch
yarn deploy-test
# deploy on build-dev branch
yarn deploy-dev
# deploy on build branch
yarn deploy
$ yarn build
```
#### Linux
From your current branch, run `yarn build`.
After this, you can launch the deployment using the command linked to the target branch.
Next you can deploy the build to the target branch:
```
# deploy on build-test branch
yarn deploy-test
$ yarn deploy-test
# deploy on build-dev branch
yarn deploy-dev
$ yarn deploy-dev
# deploy on build branch
yarn deploy
$ yarn deploy
```
### Deploy build-dev branch to Scaleway
## Deploy build-dev branch to Scaleway
You can now deploy the content of build-dev branch into Scaleway using the scripts present on the Scaleway server.
You can directly use the content of build-dev branch to update apps on dev environment using scripts (from the server).
For more informations you can check for [Easy Cozy scripts](../../../easycozy/scripts/).
### Deploy build branch to Cozy
## Deploy build branch to Cozy
Use thecozy-app-publish command after replacing following value:
You can deploy content of build branch into Cozy registry by using thecozy-app-publish command after replacing following value: