Bilingual Site Launch
Ticket #84 + #85: Recovery, Restructuring, and Deployment of Technical Documentation
Type: Recovery / Refactoring / Infrastructure
Affected Components: Project Structure, mkdocs.yml, GitHub Actions, Nginx Config
1. Context and Strategic Objective
The objective of the work documented in this report was to transition from monolingual to bilingual documentation (EN/FR) on docs.invest.justingoufo.com.
Situation History: A first attempt to implement bilingualism and footer customization, entrusted to the AI Agent (Gemini) in Firebase Studio, was marked by severe technical hallucinations, to the point of breaking the site structure, rendering it inoperable (Error 403).
Change of Approach: This report documents the recovery of the project via a directed investigation strategy on Google AI Studio to audit the damage, sanitize the architecture, ensure reliable deployment, and restore the site.
2. Investigation and Refactoring Process
-
Post-Incident Audit:
- Observation: The project architecture was fragmented (source files buried in
project_docs), making maintenance complex. - i18n Blocker: The folder structure (different names in FR and EN) was incompatible with the translation plugin, a likely aftermath of the previous attempt.
- Observation: The project architecture was fragmented (source files buried in
-
File System Refactoring (Standardization):
- Action: Removal of the superfluous
project_docslayer to move configuration back to the root. - Action: "Mirror" normalization of filenames. French files were renamed to exactly match English names (e.g., adoption of
activity_reportfor both languages), a sine qua non condition for the plugin to function.
- Action: Removal of the superfluous
-
MkDocs Configuration Fix:
- Action: Abandonment of implicit automatic translation in favor of an explicit
overrideof the menu in the configuration file. This allowed restoring French titles and navigation that had been lost.
- Action: Abandonment of implicit automatic translation in favor of an explicit
-
CI/CD Pipeline Debugging (GitHub Actions):
- Error: The pipeline failed following file moves.
- Correction: Update paths in the workflow (
deploy-docs.yml) and explicit addition to the repository of dependency files (docs-requirements.txt) that had been omitted.
-
Resolution of Deployment Incident (Nginx 404 Error):
- Symptom: Site inaccessible despite a successful build.
- Root Cause: Desynchronization between the target folder defined in GitHub Secrets and the Nginx server configuration.
- Correction: Creation of the physical directory tree on the VPS and alignment of the
DOCS_TARGET_DIRSecret.
3. Root Cause Identified (Summary)
The project instability resulted from technical debt introduced by poorly supervised automation: inconsistent file structure, erroneous i18n configuration, and disconnection between source code and deployment infrastructure.
4. Implemented Solution
- Sanitized Architecture: Clean bilingual structure (
docs/anddocs/fr/) with strict file correspondence. - Regained Control: Manual and explicit configuration of
mkdocs.ymlto ensure stability. - Infrastructure: CI/CD pipeline and Nginx server perfectly synchronized.
5. Justification and Benefits
- Service Restoration: The documentation is back online and functional.
- Reliability: The project has emerged from the unstable state left by the AI agent. The current architecture is standardized, facilitating future updates by humans.
- User Experience: Language switching and navigation are now fluid and error-free.