Skip to content

Commit 8ba89f2

Browse files
committed
Make RTD preview redirections work.
1 parent 9cecde5 commit 8ba89f2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ build:
2020
commands:
2121
- npm install -g pnpm@latest-10
2222
- make install
23-
- make build PREVIEW=true
23+
- make build PREVIEW=true SITE_URL=$READTHEDOCS_CANONICAL_URL
2424
- mkdir -p $READTHEDOCS_OUTPUT/html
2525
- cd dist && cp -r * $READTHEDOCS_OUTPUT/html

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ VPS_HOST ?= static.europython.eu
66
VPS_PROD_PATH ?= /home/static_content_user/content/europython_websites/ep2025
77
VPS_PREVIEW_PATH ?= /home/static_content_user/content/previews
88
REMOTE_CMD=ssh $(VPS_USER)@$(VPS_HOST)
9-
SITE_URL ?= "https://$(SAFE_BRANCH).ep-preview.click"
9+
SITE_URL ?= "https://ep2025.europython.eu"
1010

1111
# Variables for build/deploy
1212
# ==========================
@@ -47,7 +47,7 @@ build:
4747

4848
preview: RELEASES_DIR = $(VPS_PREVIEW_PATH)/$(SAFE_BRANCH)/releases
4949
preview: TARGET = $(RELEASES_DIR)/$(TIMESTAMP)
50-
preview:
50+
preview: SITE_URL = "https://$(SAFE_BRANCH).ep-preview.click"
5151
@echo "Preview site URL: $(SITE_URL)"
5252
echo $(TARGET)
5353
@echo "\n\n**** Deploying preview of a branch '$(BRANCH)' (safe: $(SAFE_BRANCH)) to $(TARGET)...\n\n"

0 commit comments

Comments
 (0)