diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index caa5440df..88a01c2ec 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -32,7 +32,7 @@ jobs:
working-directory: src/
- name: Build
- run: dotnet build --no-restore
+ run: dotnet build --no-restore -p:ClientAssetsRestoreCommand="npm ci"
working-directory: src/
- name: Generate Open API documentation
diff --git a/src/AzureIoTHub.Portal/Client/AzureIoTHub.Portal.Client.csproj b/src/AzureIoTHub.Portal/Client/AzureIoTHub.Portal.Client.csproj
index 7031b23b6..bf2d37125 100644
--- a/src/AzureIoTHub.Portal/Client/AzureIoTHub.Portal.Client.csproj
+++ b/src/AzureIoTHub.Portal/Client/AzureIoTHub.Portal.Client.csproj
@@ -52,10 +52,6 @@
-
- npm ci
-
-
diff --git a/src/Dockerfile b/src/Dockerfile
index 04d3eec90..1b3d69a55 100644
--- a/src/Dockerfile
+++ b/src/Dockerfile
@@ -26,10 +26,10 @@ COPY ["AzureIoTHub.Portal/Client/AzureIoTHub.Portal.Client.csproj", "AzureIoTHub
RUN dotnet restore "AzureIoTHub.Portal/Server/AzureIoTHub.Portal.Server.csproj"
COPY . .
WORKDIR "/src/AzureIoTHub.Portal/Server"
-RUN dotnet build "AzureIoTHub.Portal.Server.csproj" -c Release -o /app/build -p:Version="${BUILD_VERSION}.${GITHUB_RUN_NUMBER}"
+RUN dotnet build "AzureIoTHub.Portal.Server.csproj" -c Release -o /app/build -p:Version="${BUILD_VERSION}.${GITHUB_RUN_NUMBER}" -p:ClientAssetsRestoreCommand="npm ci"
FROM builder AS publish
-RUN dotnet publish "AzureIoTHub.Portal.Server.csproj" -c Release -o /app/publish -p:Version="${BUILD_VERSION}.${GITHUB_RUN_NUMBER}"
+RUN dotnet publish "AzureIoTHub.Portal.Server.csproj" -c Release -o /app/publish -p:Version="${BUILD_VERSION}.${GITHUB_RUN_NUMBER}" -p:ClientAssetsRestoreCommand="npm ci"
FROM base AS final
WORKDIR /app