Skip to content

Commit

Permalink
fixed build path
Browse files Browse the repository at this point in the history
  • Loading branch information
onmax committed Apr 10, 2024
1 parent a69b719 commit 738133d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion .vitepress/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 738133d

Please sign in to comment.