Skip to content

Commit 45d8ac7

Browse files
committed
docs: add deployment guide and archive script
1 parent 145a27b commit 45d8ac7

2 files changed

Lines changed: 63 additions & 0 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,30 @@ GitHub Actions ejecuta checks filtrados por paquete en cada push/PR a `main`. Ve
7676

7777
## Despliegue
7878

79+
Repositorio monorepo: **`JBDev23/hydraflow`**
80+
7981
| Componente | Plataforma | Directorio raíz |
8082
|------------|------------|-----------------|
8183
| App móvil | Expo EAS | `hydraflow-app/` |
8284
| API | Railway | `hydraflow-backend/` |
85+
86+
### Railway (backend)
87+
88+
1. En el dashboard del servicio, cambia el repo conectado a `JBDev23/hydraflow`.
89+
2. **Root Directory:** `hydraflow-backend`
90+
3. **Build Command:** `pnpm install --frozen-lockfile && pnpm build`
91+
4. **Start Command:** `pnpm start`
92+
5. Variables de entorno sin cambios: `DATABASE_URL`, `DIRECT_URL`, `JWT_SECRET`, etc.
93+
94+
pnpm detectará el workspace padre (`pnpm-workspace.yaml` en la raíz del repo clonado).
95+
96+
### Expo EAS (app)
97+
98+
1. Reconecta el proyecto EAS al repo `JBDev23/hydraflow`.
99+
2. **Root directory:** `hydraflow-app` (o ejecuta `eas build` desde esa carpeta).
100+
3. Asegúrate de que el build incluye `pnpm-workspace.yaml` y `pnpm-lock.yaml` de la raíz.
101+
4. Tras la migración, lanza un build de preview para verificar.
102+
103+
### GitHub Actions
104+
105+
El workflow [`.github/workflows/ci.yml`](.github/workflows/ci.yml) se activa automáticamente en el nuevo repo. Recrea los secrets y branch protection rules si los tenías en los repos antiguos.

scripts/archive-old-repos.ps1

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Push archive banners to hydraflow-app and hydraflow-backend before archiving on GitHub.
2+
# Run from repo root after authenticating with GitHub (git credential manager).
3+
4+
$ErrorActionPreference = "Stop"
5+
$banner = @"
6+
> **Este repositorio ha sido archivado.**
7+
> El código vive ahora en [hydraflow](https://github.com/JBDev23/hydraflow).
8+
9+
"@
10+
11+
$repos = @(
12+
@{ Name = "hydraflow-app"; Url = "https://github.com/JBDev23/hydraflow-app.git" },
13+
@{ Name = "hydraflow-backend"; Url = "https://github.com/JBDev23/hydraflow-backend.git" }
14+
)
15+
16+
$work = Join-Path $env:TEMP "hydraflow-archive-push"
17+
if (Test-Path $work) { Remove-Item -Recurse -Force $work }
18+
New-Item -ItemType Directory -Path $work | Out-Null
19+
20+
foreach ($repo in $repos) {
21+
$dir = Join-Path $work $repo.Name
22+
Write-Host "Cloning $($repo.Name)..."
23+
git clone --depth 1 $repo.Url $dir
24+
Set-Location $dir
25+
26+
$readme = Join-Path $dir "README.md"
27+
$content = Get-Content $readme -Raw
28+
if ($content -notmatch "Este repositorio ha sido archivado") {
29+
Set-Content -Path $readme -Value ($banner + "`n" + $content) -NoNewline
30+
git add README.md
31+
git commit -m "docs: archive repo, redirect to monorepo"
32+
git push origin main
33+
Write-Host "Pushed archive banner to $($repo.Name)"
34+
} else {
35+
Write-Host "Banner already present in $($repo.Name), skipping."
36+
}
37+
}
38+
39+
Write-Host ""
40+
Write-Host "Done. Archive each repo in GitHub: Settings -> General -> Danger Zone -> Archive this repository"

0 commit comments

Comments
 (0)