From 3bfd995b1746994ad4f1f52dfad9933957dcd87c Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Wed, 13 Aug 2025 15:01:27 +0800 Subject: [PATCH] fix: change release web to dockerfile --- .github/workflows/release.yml | 12 ------------ Dockerfile | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebe44cc..ea763df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -183,7 +183,6 @@ jobs: build-docker: name: Release Docker - needs: release-web strategy: matrix: include: @@ -220,17 +219,6 @@ jobs: with: submodules: true - - name: Download Web - uses: actions/download-artifact@v4 - with: - name: synctv-web - path: synctv-web/dist - - - name: Move to public - run: | - rm -rf public/dist/* - cp -r synctv-web/dist/* public/dist/ - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/Dockerfile b/Dockerfile index 15df31c..dcec8d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,13 @@ +FROM node:18-alpine AS web-builder + +WORKDIR /synctv-web + +COPY ./synctv-web/ ./ + +RUN npm ci || npm install + +RUN npm run build + FROM golang:1.25-alpine AS builder ARG VERSION @@ -8,6 +18,8 @@ COPY ./ ./ RUN apk add --no-cache bash curl git g++ +COPY --from=web-builder /synctv-web/dist/ /synctv/public/dist/ + RUN curl -sL \ https://raw.githubusercontent.com/zijiren233/go-build-action/refs/tags/v1/build.sh | \ bash -s -- \