From 994cd806f0cf35dc3caf4364daefde5e883ce40a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 09:31:22 +0000 Subject: [PATCH] feat: Improve release workflow for frontend builds This change improves the GitHub Actions release workflow by ensuring that static files from the backend are copied to the frontend directory before building the frontend Docker image. This aligns the release process with the Google Cloud Build configuration, preventing potential inconsistencies and ensuring the frontend has all necessary assets. The following changes were made: - Added a step to the `release.yml` workflow to copy `eco_project/backend/static/*` to `eco_project/frontend/`. - Updated the Docker build context for the frontend to be more specific, improving build performance and security. --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f7f958..4b6b3da 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,10 +44,13 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Copy static files to frontend + run: cp -a eco_project/backend/static/. eco_project/frontend/ + - name: Build and push frontend image uses: docker/build-push-action@v5 with: - context: . + context: ./eco_project/frontend file: ./eco_project/frontend/Dockerfile push: true tags: ${{ secrets.DOCKERHUB_USERNAME }}/eco-frontend:${{ github.ref_name }}