diff --git a/.github/workflows/default.yaml b/.github/workflows/default.yaml index a7f1542..a29dd99 100644 --- a/.github/workflows/default.yaml +++ b/.github/workflows/default.yaml @@ -18,22 +18,14 @@ jobs: steps: - name: 🔄 Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + lfs: true - name: 🔢 Prepare cache keys run: | - # Calculate cache IDs for Git LFS - git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id - LFS_CACHE_ID=$(cat .lfs-assets-id | md5sum)-v1 - echo "LFS_CACHE_ID=$LFS_CACHE_ID" >> $GITHUB_ENV echo "PNPM_STORE_PATH=$(pnpm store path)" >> $GITHUB_ENV - - name: 🗄️ Cache Git LFS objects - uses: actions/cache@v4 - with: - path: .git/lfs - key: ${{ runner.os }}-lfs-${{ env.LFS_CACHE_ID }} - - name: 🛠️ Cache PNPM dependencies uses: actions/cache@v4 with: @@ -50,9 +42,6 @@ jobs: restore-keys: | ${{ runner.os }}-astro- - - name: 🔄 Pull Git LFS files - run: git lfs pull - - name: 🏗️ Build site run: | pnpm i && pnpm build diff --git a/Dockerfile b/Dockerfile index 7ba267b..2c533ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:21-alpine +FROM node:25-alpine # Install necessary packages RUN apk add --no-cache \ diff --git a/src/components/Image.astro b/src/components/Image.astro index bf6c21f..06de6a1 100644 --- a/src/components/Image.astro +++ b/src/components/Image.astro @@ -85,7 +85,7 @@ const sizes = thumbnail pictureAttributes={{ class: `${hash ? "block h-full relative" : ""} ${loader ? "thumb" : ""} ${pictureClass}`, }} - class={Astro.props.class} + class={`${Astro.props.class} h-full w-full`} widths={sizes.map((size) => size.width)} sizes={sizes .map((size) => `${size.media || "100vw"} ${size.width}px`) diff --git a/src/components/resources/Review.astro b/src/components/resources/Review.astro index 94d065f..3a2586a 100644 --- a/src/components/resources/Review.astro +++ b/src/components/resources/Review.astro @@ -5,6 +5,13 @@ import Image from "@components/Image.astro"; import type { ImageMetadata } from "astro"; const { resource } = Astro.props; + +function formatRating(rating: string | number) { + if (typeof rating === "number") { + return "⭐".repeat(rating); + } + return rating; +} ---