ci : create svgs at build time

This commit is contained in:
2024-08-02 21:20:49 +02:00
parent 7690292567
commit 3a88d1c107
2 changed files with 9 additions and 1 deletions
+8 -1
View File
@@ -1,8 +1,15 @@
FROM node:lts-alpine AS build-stage FROM node:lts-alpine AS install-stage
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm install RUN npm install
COPY . . COPY . .
FROM git.legonzaur.fr/heronfief/cards-gen:main AS svg-stage
RUN python3 -u ./src/generate_cards_mvp.py
FROM install-stage AS build-stage
COPY --from=svg-stage /app/output/heron ./assets/images/cards/heron-svg
ARG NUXT_PUBLIC_ENDPOINT ARG NUXT_PUBLIC_ENDPOINT
ARG NUXT_PUBLIC_DISCORD_LOGIN_ENDPOINT ARG NUXT_PUBLIC_DISCORD_LOGIN_ENDPOINT
ARG NUXT_PUBLIC_WELCOME_MESSAGE ARG NUXT_PUBLIC_WELCOME_MESSAGE
+1
View File
@@ -3,6 +3,7 @@
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
"cards-gen": "docker run --rm -v --pull=always ./assets/images/cards/heron-svg:/app/output/heron git.legonzaur.fr/heronfief/cards-gen:main",
"build": "nuxt build", "build": "nuxt build",
"dev": "nuxt dev", "dev": "nuxt dev",
"generate": "nuxt generate", "generate": "nuxt generate",