on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Setup Hugo
        uses: https://github.com/peaceiris/actions-hugo.git@v2
        with:
          hugo-version: "latest"
          extended: true

      - name: Build
        run: |
          hugo --minify

      - name: Setup Go
        uses: actions/setup-go@v3
        with:
          go-version: "1.21"

      - name: Deploy
        uses: https://itsblue.dev/actions/codeberg-pages-deploy@v1
        with:
          folder: ./public
