name: Gitea Build Action
run-name: ${{ gitea.actor }} build
on: [push]

jobs:
  build-go:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup Go 1.24.x
        uses: actions/setup-go@v5
        with:
          go-version: "1.24.x"
      - name: Display Go version
        run: go version
      - name: "[server] Install dependencies"
        run: cd server && go get .
      - name: "[server] Build"
        run: cd server && go build -v ./...
      - name: "[admin] Install dependencies"
        run: cd admin && go get .
      - name: "[admin] Build"
        run: cd admin && go build -v ./...
  build-nuxt:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup Bun 1.2.0
        uses: oven-sh/setup-bun@v2
        with:
          bun-version: 1.2.0
      - name: Display Bun version
        run: bun --version
      - name: test 1
        run: ls
      - name: test 2
        run: cd web && ls
      - name: "[web] Install dependencies"
        run: cd web && bun install
      - name: "[web] Build"
        run: cd web && bun run build
