mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
build: try to build web separately.
This commit is contained in:
parent
ee494a5bc0
commit
aac0f297df
|
|
@ -90,6 +90,12 @@ jobs:
|
|||
registry: ${{ secrets.FIT2CLOUD_REGISTRY_HOST }}
|
||||
username: ${{ secrets.FIT2CLOUD_REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.FIT2CLOUD_REGISTRY_PASSWORD }}
|
||||
- name: Build Web
|
||||
run: |
|
||||
docker buildx build --target web-build --output type=local,dest=./web-build-output . -f installer/Dockerfile
|
||||
rm -rf ./ui
|
||||
cp -r ./web-build-output/ui ./
|
||||
rm -rf ./web-build-output
|
||||
- name: Docker Buildx (build-and-push)
|
||||
run: |
|
||||
sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
|
||||
|
|
@ -150,6 +156,12 @@ jobs:
|
|||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build Web
|
||||
run: |
|
||||
docker buildx build --target web-build --output type=local,dest=./web-build-output . -f installer/Dockerfile
|
||||
rm -rf ./ui
|
||||
cp -r ./web-build-output/ui ./
|
||||
rm -rf ./web-build-output
|
||||
- name: Docker Buildx (build-and-push)
|
||||
run: |
|
||||
sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
FROM node:24-alpine AS web-build
|
||||
COPY ui ui
|
||||
RUN cd ui && \
|
||||
RUN cd ui && ls -la && if [ -d "dist" ]; then exit 0; fi && \
|
||||
npm install --prefer-offline --no-audit && \
|
||||
npm install -D concurrently && \
|
||||
NODE_OPTIONS="--max-old-space-size=4096" npx concurrently "npm run build" "npm run build-chat" && \
|
||||
|
|
|
|||
Loading…
Reference in New Issue