Skip to content

Commit f9a7333

Browse files
committed
ci: Handle case-sensitive image paths
1 parent 5b32bb2 commit f9a7333

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,18 @@ jobs:
3636
run: python -m pip install -r .github/requirements.txt
3737
- name: Clone last deployed content
3838
run: |
39-
git clone --branch pages --depth 1 https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git "${{ runner.temp }}/last_deploy"
39+
# The deployed content has image paths that are derived from URLs,
40+
# which are case-sensitive, but CI runs on Windows, which is
41+
# case-insensitive by default. Enable case-sensitive paths for the
42+
# target folder before checking out into it, as subdirectories inherit
43+
# the setting.
44+
mkdir -p "${{ runner.temp }}/last_deploy"
45+
fsutil.exe file setCaseSensitiveInfo "${{ runner.temp }}/last_deploy" enable
46+
# Also tell git itself to treat paths case-sensitively, so it doesn't
47+
# collapse image paths that differ only by case during checkout or,
48+
# later, when staging the updated content for deployment. The setting
49+
# persists in the clone's config and is reused by the deploy step.
50+
git clone -c core.ignorecase=false --branch pages --depth 1 https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git "${{ runner.temp }}/last_deploy"
4051
- name: Cache Windhawk
4152
id: cache-windhawk
4253
uses: actions/cache@v5
@@ -64,8 +75,14 @@ jobs:
6475
WINDHAWK_PATH: ${{ runner.temp }}\windhawk
6576
- name: Archive mod images
6677
run: |
78+
# Image paths are derived from URLs, which are case-sensitive, but CI
79+
# runs on Windows, which is case-insensitive by default. Enable
80+
# case-sensitive paths for the images folder before creating anything
81+
# inside it, as subdirectories inherit the setting.
82+
mkdir -p images
83+
fsutil.exe file setCaseSensitiveInfo images enable
6784
# Copy last deployed images.
68-
cp -R "${{ runner.temp }}/last_deploy/images" images
85+
cp -R "${{ runner.temp }}/last_deploy/images/." images
6986
# Archive new images.
7087
python scripts/archive_mod_images.py
7188
- name: Deploy

0 commit comments

Comments
 (0)