CI: add build step to deploy workflow
- Clone from local Gitea instead of actions/checkout - Build with legacy builder (DOCKER_BUILDKIT=0) for Docker mirror support - Use npm China mirror (registry.npmmirror.com) in Dockerfile - Combined npm install+build in single RUN step - Removed stale proxy env vars
This commit is contained in:
@@ -11,11 +11,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
volumes:
|
||||
- /var/packages/ContainerManager/target/usr/bin/docker:/usr/bin/docker
|
||||
- /volume1/docker/nas-dashboard:/nas-dashboard
|
||||
env:
|
||||
HTTP_PROXY: ${{ secrets.PROXY_URL }}
|
||||
HTTPS_PROXY: ${{ secrets.PROXY_URL }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
run: git clone --depth 1 http://gitea:3000/jimmy/nas-tools.git .
|
||||
- name: Build
|
||||
run: DOCKER_BUILDKIT=0 docker build -t nas-dashboard:latest dashboard/
|
||||
- name: Deploy
|
||||
run: |
|
||||
docker compose -f /nas-dashboard/docker-compose.yml up -d --pull never
|
||||
run: docker compose -f /nas-dashboard/docker-compose.yml up -d --pull never
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
FROM node:20-alpine AS frontend
|
||||
WORKDIR /build
|
||||
COPY frontend/package.json frontend/package-lock.json* ./
|
||||
RUN npm install
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
RUN npm install --registry=https://registry.npmmirror.com && npm run build
|
||||
|
||||
# Stage 2: Python runtime
|
||||
FROM python:3.12-slim
|
||||
|
||||
Reference in New Issue
Block a user