> ## Documentation Index
> Fetch the complete documentation index at: https://docs.directgvr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy a release

> Use release_deploy.py to deploy your own release files to your server or CDN.

The `release_deploy.py` script deploys releases from any supported location (a local path, an S3 bucket, an FTP server and so on) to your server or CDN. You can run it by hand or from your continuous integration system.

> [!NOTE]
>
> Set your [deployment credentials](https://docs.directgvr.com/release-automation/deployment-scripts.md#login-credentials) before you run the script. To set up your server or CDN, see [Configure the scripts for your server or CDN](https://docs.directgvr.com/release-automation/configure-server-or-cdn.md).

## Requirements

* Python 3 and the modules in `requirements.txt` from the release package. See [Prepare the deployment scripts](https://docs.directgvr.com/quick-start/prepare-deployment-scripts.md).

## Required settings

Like every deployment script, `release_deploy.py` takes command-line arguments, JSON configuration files or both. See [How configuration works](https://docs.directgvr.com/release-automation/deployment-scripts.md#how-configuration-works). The examples here use the command line; the release package has sample JSON files for automating deployments.

At a minimum, set:

* `repository`: a name for the part of your game this release belongs to, such as `gameclient`, `map-assets`, `language_en` or `launcher`.
* `source`: full path to the folder with your release files. This can be a local path, an S3 bucket, a shared path or a CDN path in a [supported protocol](https://docs.directgvr.com/release-automation/configure-server-or-cdn.md).
* `version`: a version number such as `0.0.1` or `1.0.1`. It's optional but strongly recommended, because promotion and update path creation use it.
* `sync_directory`: full path to the destination for this release, in any of the same forms as `source`.
* `base_url`: the delivery URL your launcher downloads this repository from, for example `https://mycdn.net/mydirectory/`.

For every option, see [release\_deploy.py](https://docs.directgvr.com/release-automation/deployment-scripts.md#release_deploy-py).

### repository

The launcher workflow and the promotion script use the repository name. Don't use periods in it; underscores and dashes are fine. The name is case-sensitive, so use lowercase letters.

```bash theme={null}
--repository=llama-game
```

### source

The folder that contains your release files:

```bash theme={null}
--source=C:\SSN\llama_game\releases\33\
```

If the path has spaces, put it in quotes and use one of these forms, because the Windows command prompt treats a backslash before the closing quote as an escape:

* End the path with two backslashes: `"c:\path\with spaces\sample\source\\"`
* Use forward slashes: `"c:/path/with spaces/sample/source/"`
* Set it in the JSON configuration file: `"source": "c:/path/with spaces/sample/source/",`

### version

The version format is up to you, and periods are fine. The promotion and update path scripts can use it, so keep your scheme consistent.

```bash theme={null}
--version=1.00.033
```

### sync\_directory

The folder on your server or CDN to deploy to. The script creates a repository folder structure there with all the content and metadata a launcher needs to sync the release.

```bash theme={null}
--sync_directory=<protocol>://<your-upload-host>/<path>/
```

### base\_url

The HTTP or HTTPS delivery URL that matches `sync_directory`:

```bash theme={null}
--base_url=https://<your-delivery-host>/<path>/
```

## Run the script

Separate each argument with a space:

```bash theme={null}
release_deploy.py --repository=llama-game --source=C:\SSN\llama_game\releases\33\ --version=1.00.033 --sync_directory=<protocol>://<your-upload-host>/<path>/ --base_url=https://<your-delivery-host>/<path>/
```

The script shows status messages while it:

1. Scans the source files into a metafile.
2. Converts and uploads the files to `sync_directory`.
3. Creates a catalog file in the right folder at `sync_directory`.
4. Adds an entry for this sync directory, repository and release to your `tracker.json` file.

## What's next

Before a launcher can sync the release, assign it to an environment. See [Create environments and promote releases](https://docs.directgvr.com/release-automation/environments-and-promotion.md). Then [point your launcher at the repository](https://docs.directgvr.com/launcher-design/download-repositories.md). You can also [create delta update paths](https://docs.directgvr.com/release-automation/create-delta-update-paths.md) for the release.

## Related

* [Deployment scripts](https://docs.directgvr.com/release-automation/deployment-scripts.md)
* [Copy releases between servers or CDNs](https://docs.directgvr.com/release-automation/copy-releases.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.