feat: add OVH FTP preview deployment

This commit is contained in:
Clément SAILLANT
2026-03-14 14:29:27 +00:00
parent 49b0f6ae23
commit 3c641ba79a
17 changed files with 329 additions and 104 deletions
@@ -0,0 +1,50 @@
# OVH FTP Preview Deploy
## Pourquoi
Le deploy FTP direct depuis la machine locale bloque sur le canal de donnees FTP OVH.
Le build local fonctionne, mais l'upload reste instable.
## Solution retenue
Deployer vers OVH FTP depuis un runner GitHub Actions public.
Le runner :
- build le site avec la bonne `PUBLIC_SITE_URL`
- choisit la cible `preview` ou `production`
- synchronise `dist/` via `lftp`
## Secrets GitHub requis
- `OVH_FTP_HOST`
- `OVH_FTP_USER`
- `OVH_FTP_PASS`
- `OVH_FTP_PORT`
- `OVH_FTP_REMOTE_DIR`
## Variables GitHub requises
- `PUBLIC_SITE_URL_PROD=https://www.lelectronrare.fr/`
- `PUBLIC_SITE_URL_PREVIEW=https://www.lelectronrare.fr/preview/`
## Workflow
Fichier :
- `.github/workflows/deploy-ovh-ftp.yml`
Script cible :
- `scripts/deploy-ovh-ftp-target.sh`
## Usage
### Preview
```bash
gh workflow run deploy-ovh-ftp.yml --ref <branche> -f target=preview
```
### Production
```bash
gh workflow run deploy-ovh-ftp.yml --ref <branche> -f target=production
```