Skip to content

Commit edd2426

Browse files
_
1 parent 55874f6 commit edd2426

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ jobs:
6868

6969
- name: Build website
7070
run: |
71-
echo "Repository name: ${{ github.event.repository.name }}"
72-
echo "BASE_PATH: $BASE_PATH"
7371
ap build
7472
env:
7573
BASE_PATH: '/${{ github.event.repository.name }}'

afterpython/cli/commands/build.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,28 @@ def build(ctx, dev: bool, execute: bool):
161161
# NOTE: needs to set BASE_URL so that the project website can link to the content pages correctly at e.g. localhost:5173/doc
162162
# BASE_PATH is set by the GitHub Actions workflow
163163
base_path = os.getenv("BASE_PATH", "")
164-
click.echo(f"Using BASE_PATH: {base_path}")
165-
build_env = {**node_env, "BASE_URL": f"{base_path}/{content_type}"}
164+
print(
165+
f"DEBUG: os.environ.get('BASE_PATH'): {os.environ.get('BASE_PATH', 'NOT_FOUND')}",
166+
flush=True,
167+
)
168+
print(
169+
f"DEBUG: 'BASE_PATH' in os.environ: {'BASE_PATH' in os.environ}",
170+
flush=True,
171+
)
172+
print(
173+
f"DEBUG: 'BASE_PATH' in node_env: {'BASE_PATH' in node_env}", flush=True
174+
)
175+
print(f"DEBUG: base_path variable: '{base_path}'", flush=True)
176+
base_url = f"{base_path}/{content_type}"
177+
print(f"DEBUG: Setting BASE_URL to: '{base_url}'", flush=True)
178+
build_env = {**node_env, "BASE_URL": base_url}
179+
print(
180+
f"DEBUG: 'BASE_URL' in build_env: {'BASE_URL' in build_env}", flush=True
181+
)
182+
print(
183+
f"DEBUG: build_env['BASE_URL']: '{build_env.get('BASE_URL', 'NOT_FOUND')}'",
184+
flush=True,
185+
)
166186
result = subprocess.run(
167187
[
168188
"myst",

0 commit comments

Comments
 (0)