## Deployment Script

This script automates the deployment process for the application by force-pushing the current branch to specific environment branches.
Deploying to production must be done via a release-branch

### Usage

Be situated on the branch you want to deploy and then run the script using `yarn deploy:<environment>`

```bash
yarn deploy:stage
```

or if you want to explicitly call it by using `yarn dlx tsx scripts/deploy/deploy.ts` (or `bun`/`npx tsx`)

### Environments

| Environment | Target Branch | Description                                |
| :---------- | :------------ | :----------------------------------------- |
| `test`      | `test`        | Deploys to the test environment.           |
| `stage`     | `stage`       | Deploys to the staging environment.        |
| `preprod`   | `prod`        | Deploys to the pre-production environment. |
| `prod`      | `release`     | Deploys to the production environment.     |

### Features

- **Branch Validation**: Checks if the target environment is valid.
- **Tagging**: If deploying from a release branch (e.g., `release-v1.2.3`), it automatically creates and pushes a git tag (e.g., `v1.2.3`) if it doesn't exist.
- **Safety Check**: Prompts for confirmation before deploying.
