Skip to content

Commit ace044f

Browse files
committed
Have build as a preview requirement
1 parent d8baee2 commit ace044f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,20 @@ check:
4343
pnpm run astro check
4444

4545
build:
46-
pnpm build
46+
SITE_URL=$(SITE_URL) pnpm build
4747

4848
preview: RELEASES_DIR = $(VPS_PREVIEW_PATH)/$(SAFE_BRANCH)/releases
4949
preview: TARGET = $(RELEASES_DIR)/$(TIMESTAMP)
5050
preview: SITE_URL = "https://$(SAFE_BRANCH).ep-preview.click"
51-
preview:
51+
preview: build
5252
@echo "Preview site URL: $(SITE_URL)"
5353
echo $(TARGET)
5454
@echo "\n\n**** Deploying preview of a branch '$(BRANCH)' (safe: $(SAFE_BRANCH)) to $(TARGET)...\n\n"
5555
$(REMOTE_CMD) "mkdir -p $(TARGET)"
5656
rsync -avz --delete ./dist/ $(VPS_USER)@$(VPS_HOST):$(TARGET)/
5757
$(REMOTE_CMD) "cd $(RELEASES_DIR) && ln -snf $(TIMESTAMP) current"
5858
@echo "\n\n**** Preview complete.\n\n"
59+
@echo "Open the preview site at: $(SITE_URL)\n\n"
5960

6061

6162
ifeq ($(FORCE_DEPLOY), true)

0 commit comments

Comments
 (0)