Skip to content

Commit

Permalink
fix: web build in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp committed Jul 17, 2023
1 parent dd50a1b commit b80aad5
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci-apps-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ jobs:
run: |
pnpm --filter=web build
env:
NEXTAUTH_URL: https://localhost:3000
NEXTAUTH_SECRET: secret
APP_CACHE_DSN: ''
# Speed up build: they are linted in a previous step
NEXT_IGNORE_ESLINT: true
# Speed up build: they are type-checked in a previous step
Expand Down
2 changes: 2 additions & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"@heroicons/react": "2.0.18",
"@hookform/resolvers": "3.1.1",
"@httpx/exception": "1.8.2",
"@soluble/cache-interop": "^0.12.8",
"@soluble/cache-ioredis": "^0.13.11",
"@soluble/dsn-parser": "^1.9.2",
"@vercel/analytics": "1.0.1",
"@wayofdev/facebook-pixel": "workspace:*",
Expand Down
13 changes: 13 additions & 0 deletions apps/web/src/config/app-cache.config.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { MapCacheAdapter } from '@soluble/cache-interop'
import { getIoRedisOptionsFromDsn, IoRedisCacheAdapter } from '@soluble/cache-ioredis'

const appCacheDsn = process.env.APP_CACHE_DSN ?? null

export const appCache = !appCacheDsn
? new MapCacheAdapter()
: new IoRedisCacheAdapter({
connection: getIoRedisOptionsFromDsn(appCacheDsn, {
connectTimeout: 3_000,
maxRetriesPerRequest: 2,
}),
})
77 changes: 77 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b80aad5

Please sign in to comment.