name: Build Frontend

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Build Docker image
        run: docker build -t ember-market-frontend .

      - name: Login to Gitea Registry
        run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login https://runner.thaiboydigit.al -u g --password-stdin

      - name: Tag Docker image
        run: docker tag ember-market-frontend runner.thaiboydigit.al/g/ember-market-frontend:latest

      - name: Push Docker image
        run: docker push runner.thaiboydigit.al/g/ember-market-frontend:latest
