From c646840654af4b26803722f04dbe19a44b5c6270 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Sat, 10 Jan 2026 16:41:06 +0200 Subject: [PATCH] Fix CI: use git reset --hard for reliable base commit restore The previous approach using git reset HEAD~ followed by git restore . wasn't reliably restoring the package.json to the base commit state, causing "Command not found" errors when trying to run generate-webpack-stats-file. Using --hard ensures all tracked files are forcefully reset to the base commit state. Also added --force to yarn install to ensure a clean reinstall after the reset. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/pull-request-commit.yml | 5 ++--- .gitignore | 5 ----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pull-request-commit.yml b/.github/workflows/pull-request-commit.yml index cc2dbe78bd..3f511b806b 100644 --- a/.github/workflows/pull-request-commit.yml +++ b/.github/workflows/pull-request-commit.yml @@ -74,13 +74,12 @@ jobs: - name: Restore to base commit if: ${{ !steps.get-base-stats.outputs.cache-hit }} run: | - git reset HEAD~ - git restore . + git reset --hard HEAD~ - name: 🔦 Generate stats file from base commit if: ${{ !steps.get-base-stats.outputs.cache-hit }} run: | - yarn install + yarn install --force yarn intl:build yarn generate-webpack-stats-file mv stats.json stats-base.json diff --git a/.gitignore b/.gitignore index e8423dbba6..38a12f24c0 100644 --- a/.gitignore +++ b/.gitignore @@ -71,9 +71,6 @@ artifacts # Expo .expo/ dist/ - -# Rsbuild -.rsbuild/ *.jks *.p8 *.p12 @@ -124,9 +121,7 @@ src/locale/locales/**/*.js bskyogcard/src/assets/fonts/noto-* # bskyweb build output -bskyweb/static/js/ bskyweb/static/media/*.webp bskyweb/static/media/*.jpg bskyweb/static/media/*.png bskyweb/static/media/*.svg -bskyweb/static/media/*.woff2