From e0f44a85ae2ef0e731cb75e193a0ccb5ba0b5076 Mon Sep 17 00:00:00 2001 From: Gabriel Lucaci Date: Mon, 22 Apr 2024 10:43:05 +0200 Subject: [PATCH] Fix UI build (#78) --- .github/workflows/pull-request.yml | 20 ++++++++++++++++++++ .github/workflows/release.yml | 17 +++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 4906108..0a02115 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -23,3 +23,23 @@ jobs: pr_target_branch: ${{ github.base_ref }} github_repository: ${{ github.repository }} sonar_exclusions: ${{ vars.SONAR_EXCLUSIONS }} + + ui: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + check-latest: true + node-version-file: 'src/UI/package.json' + cache: 'yarn' + cache-dependency-path: 'src/UI/yarn.lock' + - name: Build UI + run: | + export NODE_OPTIONS=--openssl-legacy-provider + yarn config set strict-ssl false + yarn --cwd src/UI + yarn --cwd src/UI build + shell: bash diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 565849b..a2a1928 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,23 @@ jobs: uses: actions/checkout@v4 - name: Use .NET SDK from global.json uses: actions/setup-dotnet@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + check-latest: true + node-version-file: 'src/UI/package.json' + cache: 'yarn' + cache-dependency-path: 'src/UI/yarn.lock' + - name: Build UI + run: | + export NODE_OPTIONS=--openssl-legacy-provider + yarn config set strict-ssl false + yarn --cwd src/UI + yarn --cwd src/UI build + rm -rf src/Server/src/AspNet/UI + mkdir src/Server/src/AspNet/UI/ + cp -rf src/UI/dist/* src/Server/src/AspNet/UI + shell: bash - name: Build, Test and Push uses: swisslife-oss/actions/release-packages@main with: