# Deploy do FUSION Ventures

Site `www.fusionventures.com.br`, conectado ao repositório
`FCJ-VB/fusionventures-fcjvb` e ao projeto Lovable
`fusionventures-fcjvb.lovable.app`.

- Checkout na VM: `/var/www/html/fusionventures/fusionventures-fcjvb`, dono
  `deploy`.
- Serviço: `fusionventures.service`, Node em `127.0.0.1:3012`.
- Apache: `ops/apache-www.fusionventures.com.br.conf` atende HTTP enquanto o
  DNS não aponta para a VM. Após a virada do DNS, emitir o certificado
  Let's Encrypt e então habilitar HTTPS.

## Build

```bash
npm ci --no-audit --no-fund
npm run build
test -f .output/server/index.mjs
for asset in public/media/fusion/*; do test -s ".output/public/${asset#public/}"; done
```

## Deploy

O workflow `.github/workflows/deploy.yml` compila pushes e PRs para `main`.
Com `ENABLE_EC2_DEPLOY=true`, publica na VM por VPN/SSH.

```bash
sudo -n -u deploy bash /var/www/html/fusionventures/fusionventures-fcjvb/deploy.sh
```
