From 79ff067085e957122b8aa7fd5ebdb614ce88096a Mon Sep 17 00:00:00 2001 From: Laurent Fasani Date: Thu, 21 Nov 2024 17:46:40 +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 | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8120d9d..cbdef12 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,6 +45,20 @@ jobs: - name: Setup some global environment variables run: | echo "git_describe=$(git describe)" >> $GITHUB_ENV + echo "app_version_latest=$(grep version frontend/package.json | awk -F \" '{print $4}')" >> $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-web/dist/* backend/deeplab-frontend/src/main/resources/static - name: Build the backend env: @@ -58,4 +72,10 @@ 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 + + - name: Store the fat jar + uses: actions/upload-artifact@v4 + with: + name: application fat jar + path: backend/deeplab-application/target/deeplab-application-${{ env.app_version_latest }}.jar