From 738133d8048034cc2958705c1c385ad7a851d9c6 Mon Sep 17 00:00:00 2001 From: Maxi Date: Wed, 10 Apr 2024 08:22:12 +0200 Subject: [PATCH] fixed build path --- .github/workflows/deploy.yaml | 2 +- .vitepress/config.ts | 4 ++-- .vitepress/vite.config.ts | 3 ++- package.json | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 430109a..d3041e9 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -41,7 +41,7 @@ jobs: run: pnpm install - name: Build with VitePress run: | - DEPLOYMENT_ENV=Preview pnpm build + pnpm build --mode staging ls build/web-client touch .vitepress/dist/.nojekyll - name: Test diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 62916bd..d710de6 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -2,7 +2,6 @@ import { existsSync } from 'node:fs' import { basename, dirname, join } from 'node:path' import { env } from 'node:process' import { defineConfig } from 'vitepress' -import container from 'markdown-it-container' import { spawn } from 'cross-spawn' import { readPackageJSON } from 'pkg-types' import { sidebar } from './sidebar.config' @@ -13,7 +12,8 @@ import { navigation } from './navigation.config' // https://vitepress.dev/reference/site-config export default async () => { const { title, description, homepage } = await readPackageJSON() - const baseUrl = env.NODE_ENV === 'production' ? '/developers' : '/developer-center/' + const isProduction = env.NODE_ENV === 'production' + const baseUrl = isProduction ? '/developers' : '/developer-center/' return defineConfig({ base: baseUrl, diff --git a/.vitepress/vite.config.ts b/.vitepress/vite.config.ts index efeba62..4238a59 100644 --- a/.vitepress/vite.config.ts +++ b/.vitepress/vite.config.ts @@ -17,7 +17,8 @@ export default defineConfig(async ({ mode }) => { const { specUrl, specVersion } = await generateRpcDocs() await generateWebClientDocs() - const environment = env.DEPLOYMENT_ENV || mode + const environment = env.NODE_ENV || mode + consola.debug(`Building for ${environment}`) const { albatrossCommitDate, albatrossCommitHash, commitHash, commitUrl, repoUrl } = await getGitStats() diff --git a/package.json b/package.json index 4a68307..fed6d22 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,6 @@ "knitwork": "^1.1.0", "lint-staged": "^15.2.2", "markdown-it": "^14.1.0", - "markdown-it-container": "^4.0.0", "node-html-parser": "^6.1.13", "pkg-types": "^1.0.3", "postcss": "^8.4.38",