From 2b8f431d6029af8a19a28b7fdfbe268bf625750b Mon Sep 17 00:00:00 2001 From: Laurent Fasani Date: Thu, 21 Nov 2024 14:27:17 +0100 Subject: [PATCH] [releng] Update the workflow to build the front-end Bug: https://github.com/ObeoNetwork/pepper/issues/1 Signed-off-by: Laurent Fasani --- .github/workflows/build.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8120d9d..683171a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,19 @@ jobs: run: | echo "git_describe=$(git describe)" >> $GITHUB_ENV + - name: Build the frontend packages + run: | + echo "//npm.pkg.github.com/:_authToken=${{ github.token }}" >> .npmrc + echo "CI=true" >> $GITHUB_ENV + npm ci + npm run build + working-directory: frontend + + - name: Copy frontend artifacts + run: | + mkdir -p backend/deeplab-frontend/src/main/resources/static + cp -R frontend/deeplab/dist/* backend/deeplab-frontend/src/main/resources/static + - name: Build the backend env: USERNAME: ${{ github.actor }} @@ -58,4 +71,4 @@ jobs: USERNAME: ${{ github.actor }} PASSWORD: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }} - run: mvn -B deploy -DskipTests --settings settings.xml + run: mvn -B deploy -DskipTests -f backend/pom.xml --settings settings.xml