Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

Fixed build issues (#325)

Joseph Milazzodfddb551d258
diff --git a/.github/workflows/nightly-docker.yml b/.github/workflows/nightly-docker.yml
index 87fe872a5..38d243d8f 100644
--- a/.github/workflows/nightly-docker.yml
+++ b/.github/workflows/nightly-docker.yml
@@ -25,9 +25,15 @@ jobs:
with:
node-version: '14'
- run: |
+ echo 'Removing old wwwroot'
+ rm -rf API/wwwroot/*
cd Kavita-webui/ || exit
+ echo 'Installing web dependencies'
npm install
+ echo 'Building UI'
npm run prod
+ echo 'Copying back to Kavita wwwroot'
+ cp -r dist/* ../Kavita/API/wwwroot
cd ../ || exit
- name: Compile dotnet app
diff --git a/.github/workflows/stable-docker.yml b/.github/workflows/stable-docker.yml
index eda639b37..ab57ecb82 100644
--- a/.github/workflows/stable-docker.yml
+++ b/.github/workflows/stable-docker.yml
@@ -25,9 +25,15 @@ jobs:
with:
node-version: '14'
- run: |
+ echo 'Removing old wwwroot'
+ rm -rf API/wwwroot/*
cd Kavita-webui/ || exit
+ echo 'Installing web dependencies'
npm install
+ echo 'Building UI'
npm run prod
+ echo 'Copying back to Kavita wwwroot'
+ cp -r dist/* ../Kavita/API/wwwroot
cd ../ || exit
- name: Compile dotnet app
diff --git a/action-build.sh b/action-build.sh
index faaaa4f01..4571c93e9 100755
--- a/action-build.sh
+++ b/action-build.sh
@@ -59,6 +59,22 @@ Package()
}
+BuildUI()
+{
+ ProgressStart 'Building UI'
+ echo 'Removing old wwwroot'
+ rm -rf API/wwwroot/*
+ cd ../Kavita-webui/ || exit
+ echo 'Installing web dependencies'
+ npm install
+ echo 'Building UI'
+ npm run prod
+ echo 'Copying back to Kavita wwwroot'
+ cp -r dist/* ../Kavita/API/wwwroot
+ cd ../Kavita/ || exit
+ ProgressEnd 'Building UI'
+}
+
dir=$PWD
if [ -d _output ]
diff --git a/build.sh b/build.sh
index adb753827..7e137a790 100644
--- a/build.sh
+++ b/build.sh
@@ -32,7 +32,6 @@ Build()
slnFile=Kavita.sln
- #dotnet clean $slnFile -c Debug
dotnet clean $slnFile -c Release
if [[ -z "$RID" ]];
@@ -102,8 +101,8 @@ Package()
RID="$1"
-Build
BuildUI
+Build
dir=$PWD
diff --git a/docker-build.sh b/docker-build.sh
index c97478910..a0adc4bbf 100644
--- a/docker-build.sh
+++ b/docker-build.sh
@@ -37,6 +37,19 @@ BuildUI()
npm run prod
cd ../Kavita/ || exit
ProgressEnd 'Building UI'
+
+ ProgressStart 'Building UI'
+ echo 'Removing old wwwroot'
+ rm -rf API/wwwroot/*
+ cd ../Kavita-webui/ || exit
+ echo 'Installing web dependencies'
+ npm install
+ echo 'Building UI'
+ npm run prod
+ echo 'Copying back to Kavita wwwroot'
+ cp -r dist/* ../Kavita/API/wwwroot
+ cd ../Kavita/ || exit
+ ProgressEnd 'Building UI'
}
Package()