name: Deploy

# Auto-deploy on push to main. Runs on the self-hosted Gitea runner (which has the
# host Docker socket) and rebuilds + restarts the stack on the same host.
# The public site ends up on host port 1337 (see deploy/docker-compose.yml).
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build and (re)start the stack
        run: docker compose -f deploy/docker-compose.yml up -d --build --remove-orphans
