fix: check CI on local build and start (#182)
This commit is contained in:
parent
3cbdf9eab5
commit
509ff9e016
3 changed files with 6 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
import _fs from 'unstorage/drivers/fs'
|
||||
// @ts-expect-error unstorage needs to provide backwards-compatible subpath types
|
||||
import _kv from 'unstorage/drivers/cloudflare-kv-http'
|
||||
import { isCI } from 'std-env'
|
||||
|
||||
import { $fetch } from 'ohmyfetch'
|
||||
import type { Storage } from 'unstorage'
|
||||
|
@ -13,14 +14,14 @@ import { APP_NAME } from '~/constants'
|
|||
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
export const HOST_DOMAIN = runtimeConfig.deployUrl
|
||||
|| (process.dev ? 'http://localhost:5314' : 'https://elk.zone')
|
||||
|| (process.dev || !isCI ? 'http://localhost:5314' : 'https://elk.zone')
|
||||
|
||||
const fs = _fs as typeof import('unstorage/dist/drivers/fs')['default']
|
||||
const kv = _kv as typeof import('unstorage/dist/drivers/cloudflare-kv-http')['default']
|
||||
|
||||
const storage = useStorage() as Storage
|
||||
|
||||
if (process.dev) {
|
||||
if (process.dev || !isCI) {
|
||||
storage.mount('servers', fs({ base: 'node_modules/.cache/servers' }))
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue