diff --git a/.github/workflows/Deploy.yml b/.github/workflows/Deploy.yml index b4ca664..2bed758 100644 --- a/.github/workflows/Deploy.yml +++ b/.github/workflows/Deploy.yml @@ -13,6 +13,12 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -38,9 +44,10 @@ jobs: type=ref,event=tag - name: Build and push Docker image - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . + platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index 336b824..69a3cf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,11 @@ -FROM node:21-alpine AS base +FROM oven/bun:1 AS base FROM base AS deps -RUN apk add --no-cache libc6-compat WORKDIR /app -RUN apk --no-cache add ca-certificates wget -RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk -RUN apk add --no-cache --force-overwrite glibc-2.28-r0.apk COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* bun.lockb* ./ -RUN \ - if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ - elif [ -f package-lock.json ]; then npm ci; \ - elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \ - elif [ -f bun.lockb ]; then npm install -g bun && bun install; \ - else echo "Lockfile not found." && exit 1; \ - fi +RUN bun install FROM base AS builder @@ -25,7 +14,7 @@ COPY --from=deps /app/node_modules ./node_modules COPY . . -RUN yarn build +RUN bun run build FROM base AS runner diff --git a/bun.lockb b/bun.lockb index 3f35af2..cec27df 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/lib/serverFetch.tsx b/lib/serverFetch.tsx index 6d84ab0..020f162 100644 --- a/lib/serverFetch.tsx +++ b/lib/serverFetch.tsx @@ -6,7 +6,6 @@ import { error } from "console"; import { unstable_noStore as noStore } from "next/cache"; import getEnv from "./env-entry"; - export async function GetNezhaData() { noStore();