name: Deploy Hugo

on:
  push:
    branches: [ main ]

jobs:
  build-deploy:
    runs-on: docker
    container:
      image: klakegg/hugo:ext-alpine
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Build
        run: hugo --minify

      - name: Deploy to web root
        run: |
          rm -rf /var/www/zoness.me/*
          cp -r public/* /var/www/zoness.me/
