From d3e6999a6c9faf85addb9c8cdedf076ae74d2bc3 Mon Sep 17 00:00:00 2001 From: Javier Feliz Date: Wed, 16 Jul 2025 19:44:26 -0400 Subject: [PATCH] Update build action with composer and npm installs --- .github/workflows/build.yml | 19 +++++++++++++++++++ Dockerfile | 7 +------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e40b41b..2a272cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,25 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '24' + + - name: Set up PHP with Composer + uses: shivammathur/setup-php@v2 + with: + php-version: '8.4' + tools: composer + + - name: Install PHP dependencies + run: composer install --no-interaction --prefer-dist --optimize-autoloader + + - name: Install JS dependencies and build assets + run: | + npm ci + npm run build + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/Dockerfile b/Dockerfile index b22c8a6..4a66b30 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,4 @@ FROM gitgud.foo/thegrind/laravel-base:latest # Get the app in there -WORKDIR /app -COPY . . - -# Install deps and built front end assets -RUN composer install --no-interaction --prefer-dist --optimize-autoloader -RUN npm install && npm run build \ No newline at end of file +COPY . /app \ No newline at end of file