From 2dc9fb4b4b5055726b11b8558c23cf5e99a05ed6 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 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8120d9d..e34ad26 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,18 @@ 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 + + - 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 +70,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