Skip to content

Commit ddb4b7f

Browse files
committed
fix(ci): flatten node_modules.tar.gz to prevent double nesting on extract
1 parent 191719c commit ddb4b7f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/cms_cms.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ jobs:
7575
cp -rL .next/static deployment/.next/static || true
7676
7777
cd deployment
78-
# Compress node_modules to tar.gz to force Azure to use our fresh dependencies and overwrite any stale artifacts
79-
tar -czf node_modules.tar.gz node_modules
78+
# Compress node_modules to tar.gz (flat archive)
79+
# We cd into node_modules so the tarball doesn't contain the 'node_modules' folder itself, but just its contents.
80+
# Azure extracts this into /node_modules, so we want the contents directly there.
81+
cd node_modules && tar -czf ../node_modules.tar.gz . && cd ..
8082
rm -rf node_modules
8183
8284
zip -r ../release.zip .

.github/workflows/main_cms.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ jobs:
7676
cp -rL .next/static deployment/.next/static || true
7777
7878
cd deployment
79-
# Compress node_modules to tar.gz to force Azure to use our fresh dependencies and overwrite any stale artifacts
80-
tar -czf node_modules.tar.gz node_modules
79+
# Compress node_modules to tar.gz (flat archive)
80+
# We cd into node_modules so the tarball doesn't contain the 'node_modules' folder itself, but just its contents.
81+
# Azure extracts this into /node_modules, so we want the contents directly there.
82+
cd node_modules && tar -czf ../node_modules.tar.gz . && cd ..
8183
rm -rf node_modules
8284
8385
zip -r ../release.zip .

0 commit comments

Comments
 (0)