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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user