diff --git a/.lagoon/Dockerfile b/.lagoon/Dockerfile index 2a0319b1a..9027aeeb8 100644 --- a/.lagoon/Dockerfile +++ b/.lagoon/Dockerfile @@ -35,11 +35,6 @@ RUN --mount=type=cache,target=/tmp/cache composer install --no-dev WORKDIR /app -# Decap config. -ENV VITE_DECAP_REPO='AmazeeLabs/silverback-template' -ARG LAGOON_GIT_BRANCH -ENV VITE_DECAP_BRANCH="$LAGOON_GIT_BRANCH" - # Copy the all package sources, install and prepare them. COPY . /app RUN --mount=type=cache,target=/tmp/cache pnpm i && \ @@ -118,4 +113,9 @@ RUN npm install -g pnpm@8.15.9 COPY --from=builder /tmp/.deploy/publisher /app +# Decap config. +ENV VITE_DECAP_REPO='AmazeeLabs/silverback-template' +ARG LAGOON_GIT_BRANCH +ENV VITE_DECAP_BRANCH="$LAGOON_GIT_BRANCH" + CMD pnpm publisher diff --git a/apps/decap/turbo.json b/apps/decap/turbo.json index b6cfb94b3..5762cd9b7 100644 --- a/apps/decap/turbo.json +++ b/apps/decap/turbo.json @@ -3,6 +3,7 @@ "extends": ["//"], "tasks": { "prep:vite": { + "env": ["VITE_DECAP_REPO", "VITE_DECAP_BRANCH"], "dependsOn": ["^prep"], "inputs": ["src/**", "vite.config.ts", "index.html"], "outputs": ["dist/**"] diff --git a/apps/publisher/publisher.config.ts b/apps/publisher/publisher.config.ts index 4f40ae0e4..65111013a 100644 --- a/apps/publisher/publisher.config.ts +++ b/apps/publisher/publisher.config.ts @@ -72,6 +72,8 @@ function githubEnvVars(): Record { 'PUBLISHER_OAUTH2_SESSION_SECRET', 'PUBLISHER_OAUTH2_ENVIRONMENT_TYPE', 'PUBLISHER_OAUTH2_TOKEN_HOST', + 'VITE_DECAP_REPO', + 'VITE_DECAP_BRANCH', ].map((name) => { if (name === 'DRUPAL_INTERNAL_URL') { // No internal URLs when building on Github.