Compare commits

..

No commits in common. "537ed60fa87806a087f8d80e85bc0ee93b595f5f" and "6dd88f897c33e34f6ae567f1145d070cdeb94442" have entirely different histories.

2 changed files with 7 additions and 13 deletions

View File

@ -7,18 +7,10 @@ RUN corepack enable && corepack prepare pnpm@latest --activate
ENV CI=true
WORKDIR /app
# Copy package.json and pnpm-lock.yaml first for caching
COPY package.json pnpm-lock.yaml ./
# Install dependencies
RUN pnpm install
# Copy the rest of the files
COPY . .
# Build the application
RUN pnpm build
# Install dependencies and build
RUN pnpm install && pnpm build
FROM node:18-alpine AS runner

View File

@ -1,14 +1,16 @@
import { revalidatePath } from 'next/cache';
import { revalidateTag } from 'next/cache';
import { NextResponse } from 'next/server';
import { FetchTags } from '@/shared/api/tags';
export async function GET() {
try {
revalidatePath('*'); // Drop all cache
revalidateTag(FetchTags.TAYLOR);
return NextResponse.json({ success: true });
} catch (err) {
return NextResponse.json(
{ error: 'Failed to drop cache', detail: err },
{ error: 'Failed to revalidate', detail: err },
{ status: 500 },
);
}