Skip to content

Commit a79f9c6

Browse files
committed
release: v1.0 Codoi, AI insights for GitHub repositories
- Fixed TypeScript errors from dependency updates - Added .env.example for environment setup - Added deployment guide for Google Cloud - Version 1.0.0
1 parent 16e795d commit a79f9c6

3 files changed

Lines changed: 59 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
- name: Set up Cloud SDK
2121
uses: google-github-actions/setup-gcloud@v2
2222

23+
- name: Create Artifact Registry repository
24+
run: gcloud artifacts repositories create cloud-run-source-deploy --repository-format=docker --location=us-central1 --project ${{ secrets.GCP_PROJECT_ID }} || true
25+
2326
- name: Configure Docker for Artifact Registry
2427
run: gcloud auth configure-docker us-central1-docker.pkg.dev
2528

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Crafted with Firebase Studio, Github Copilot, and the care of a human developer
99
[![Next.js](https://img.shields.io/badge/Next.js-15-black)](https://nextjs.org/)
1010
[![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue)](https://www.typescriptlang.org/)
1111

12-
[Live Demo](https://codoi.milumon.dev/)[Documentation](docs/website-copy.md)[Vibe Coding Methodology](docs/VIBE_CODING_WITH_REFERENCES.md)[Report Bug](https://github.com/Milumon/codeinsights/issues)
12+
[Live Demo](https://codoi.milumon.dev/)[Deployment Guide](docs/DEPLOYMENT_GUIDE.md)[Vibe Coding Methodology](docs/VIBE_CODING_WITH_REFERENCES.md)[Report Bug](https://github.com/Atypical-Playworks/codoi/issues)
1313

1414
---
1515

docs/DEPLOYMENT_GUIDE.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Guía Rápida de Despliegue a Google Cloud
2+
3+
Esta guía explica los pasos mínimos para desplegar **Codoi** en una cuenta GCP diferente usando el workflow de GitHub Actions existente. El workflow se encarga del build, push y despliegue; solo necesitas configurar permisos y secrets.
4+
5+
## Prerrequisitos
6+
- Cuenta GCP con facturación (o créditos gratuitos).
7+
- Repo de GitHub con el código y workflow (`.github/workflows/deploy.yml`).
8+
9+
## Paso 1: Crear Proyecto GCP
10+
1. Ve a [Google Cloud Console](https://console.cloud.google.com/).
11+
2. Crea un proyecto y anota el **Project ID** (e.g., `my-codoi-project`).
12+
13+
## Paso 2: Habilitar APIs
14+
En [APIs y servicios > Biblioteca](https://console.cloud.google.com/apis/library), habilita:
15+
- **Cloud Run API**
16+
- **Artifact Registry API**
17+
- **Vertex AI API** (opcional, para IA)
18+
19+
## Paso 3: Crear Service Account y Roles
20+
1. Ve a [IAM > Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts) > **Crear cuenta de servicio**:
21+
- Nombre: `codoi-service-account`
22+
- Descripción: "Para despliegues de Codoi"
23+
2. Otorga roles ([edita la SA](https://console.cloud.google.com/iam-admin/iam) después de crearla):
24+
- **Cloud Run Admin** (`roles/run.admin`)
25+
- **Artifact Registry Writer** (`roles/artifactregistry.writer`)
26+
- **Vertex AI User** (`roles/aiplatform.user`) - opcional
27+
- **Logs Viewer** (`roles/logging.viewer`) - opcional, para debug
28+
29+
## Paso 4: Generar Clave JSON
30+
1. En la SA > **Claves** > **Agregar clave** > **JSON**.
31+
2. Descarga el archivo (guárdalo seguro).
32+
33+
## Paso 5: Configurar Secrets en GitHub
34+
Ve a tu repo > **Settings > Secrets > Actions** y agrega:
35+
- `GCP_PROJECT_ID`: Tu Project ID.
36+
- `GCP_SA_KEY`: Contenido del JSON descargado.
37+
- Asegúrate de que los otros secrets estén: `NEXT_PUBLIC_FIREBASE_*`, `GOOGLE_GENERATIVE_AI_API_KEY`, etc.
38+
39+
## Paso 6: Desplegar
40+
1. Push a `main` en GitHub.
41+
2. El workflow despliega automáticamente en Cloud Run.
42+
3. URL: `https://codoi-[project-number]-uc.a.run.app`
43+
44+
## Costos (Blaze Plan)
45+
- Cloud Run: ~$0.10/hora (2M requests gratis/mes).
46+
- Artifact Registry: ~$0.10/GB.
47+
- Vertex AI: Pago por uso.
48+
49+
## Troubleshooting
50+
- **API no habilitada**: Habilita en [APIs](https://console.cloud.google.com/apis/library).
51+
- **Permisos insuficientes**: Revisa roles en [IAM](https://console.cloud.google.com/iam-admin/iam).
52+
- **Secrets faltantes**: Verifica en GitHub.
53+
- **Logs**: En [Logging](https://console.cloud.google.com/logs/query) > Filtrar por `cloud_run_revision`.
54+
55+
¡Listo! El workflow hace el resto.

0 commit comments

Comments
 (0)