> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reincarnatiopedia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deployment

> CI/CD pipeline and deployment workflow

# Deployment

## Git Workflow

Trunk-based development with protected main branch:

```mermaid theme={null}
graph LR
    Dev[Feature Branch] -->|PR| CI[GitHub Actions]
    CI -->|Lint Pass| Review[Code Review]
    Review -->|Approve| Main[main branch]
    Main -->|Manual| Server[git pull on server]
```

1. Create feature branch
2. Push → GitHub Actions runs lint checks
3. PR requires 1 approval + CI pass
4. Squash merge to main
5. Manual `git pull` on server

## CI Checks

| Check           | Tool   | Scope                   |
| --------------- | ------ | ----------------------- |
| Python lint     | ruff   | `bot/`, `mcp-server/`   |
| JavaScript lint | eslint | `consilium/server.js`   |
| PHP syntax      | php -l | `wordpress/mu-plugins/` |

## Server Deployment

Code reaches production via symlinks:

```
/opt/reincarnatiopedia/bot/scripts     → /opt/lighthouse-bot/scripts
/opt/reincarnatiopedia/consilium/      → /root/consilium/server.js
/opt/reincarnatiopedia/wordpress/      → WordPress mu-plugins directory
/opt/reincarnatiopedia/frontend/       → /var/www/consilium/
```

After `git pull`, services pick up changes immediately. Restart only needed for Node.js (Consilium) and Python (MCP server, bot) services.

## Why No Auto-Deploy?

Intentional. With a single production server running 200 language subdomains, every deploy is reviewed manually. Safety over speed.
