name: Build Flutter Web and Docker Image for Local Registry

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  build:
    name: Build React Native Web App
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: 18.x
          cache: npm

      - name: Install dependencies
        run: npm ci

      - name: Build
        run: npx expo export --platform web

      - name: List Web Build Output
        run: ls -l ./dist

      - name: List Root Directory
        run: ls -l /

      - name: Copy Files to hosting directory.
        run: cp -Rf ./dist/* /data/pogdark
