Skip to content

Commit 5f15735

Browse files
committed
Refactor deployment base path to use repository name instead of package name for consistent asset paths
1 parent 2c7b9b1 commit 5f15735

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/static.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ jobs:
6161
BASE_PATH: ${{ steps.vars.outputs.subpath }}
6262
run: |
6363
# Compute a single deploy base that always ends with a trailing slash
64-
# Use package name from package.json as base so built assets match paths
65-
REPO_NAME=$(node -e "console.log(require('./package.json').name)")
64+
# Use repository name as base (strip organization) so site is published under the repo path
65+
REPO_NAME=${GITHUB_REPOSITORY#*/}
6666
if [ -n "$BASE_PATH" ]; then
6767
DEPLOY_BASE="/${REPO_NAME}/${BASE_PATH}/"
6868
else
@@ -133,8 +133,8 @@ jobs:
133133
BASE_PATH: ${{ steps.vars.outputs.subpath }}
134134
run: |
135135
# Compute a single deploy base that always ends with a trailing slash
136-
# Use package name from package.json as base so built assets match paths
137-
REPO_NAME=$(node -e "console.log(require('./package.json').name)")
136+
# Use repository name as base (strip organization) so site is published under the repo path
137+
REPO_NAME=${GITHUB_REPOSITORY#*/}
138138
if [ -n "$BASE_PATH" ]; then
139139
DEPLOY_BASE="/${REPO_NAME}/${BASE_PATH}/"
140140
else

0 commit comments

Comments
 (0)