Use fixed same-origin API proxy
Verify mini program and deploy preview / verify-deploy (push) Successful in 37s

This commit is contained in:
2026-09-18 22:59:20 +08:00
parent 3dfd887a0c
commit 89787d21e5
5 changed files with 4 additions and 11 deletions
+1 -2
View File
@@ -16,7 +16,6 @@ jobs:
SOURCE_REPOSITORY: ${{ gitea.repository }}
SOURCE_REVISION: ${{ gitea.sha }}
DEPLOY_PORT: ${{ vars.DEPLOY_PORT || '3000' }}
API_BASE_URL: ${{ vars.API_BASE_URL }}
steps:
- name: Fetch exact revision
env: { SOURCE_TOKEN: "${{ secrets.GITEA_TOKEN || gitea.token }}" }
@@ -43,7 +42,7 @@ jobs:
set -eu
docker network inspect pk-lab-public >/dev/null 2>&1 || docker network create pk-lab-public
docker rm -f pk-lab-xhs-preview 2>/dev/null || true
docker run -d --name pk-lab-xhs-preview --restart unless-stopped --network pk-lab-public --read-only --tmpfs /tmp --tmpfs /var/cache/nginx --tmpfs /var/run -e API_BASE_URL="$API_BASE_URL" -p "$DEPLOY_PORT:8080" "pk-lab-xhs:$SOURCE_REVISION"
docker run -d --name pk-lab-xhs-preview --restart unless-stopped --network pk-lab-public --read-only --tmpfs /var/cache/nginx --tmpfs /var/run -p "$DEPLOY_PORT:8080" "pk-lab-xhs:$SOURCE_REVISION"
for i in 1 2 3 4 5 6 7 8 9 10; do
status="$(docker inspect --format '{{.State.Health.Status}}' pk-lab-xhs-preview)"
[ "$status" = healthy ] && exit 0