From 93f467cf0fb6afe896b57cf7ca361b7d11b0d4f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Wed, 9 Apr 2025 19:34:27 +0200 Subject: [PATCH 1/5] Fix assets URLs when base finishes with a slash --- packages/gitbook/src/lib/assets.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/gitbook/src/lib/assets.ts b/packages/gitbook/src/lib/assets.ts index 0b53e31e73..622d7ac95c 100644 --- a/packages/gitbook/src/lib/assets.ts +++ b/packages/gitbook/src/lib/assets.ts @@ -1,8 +1,9 @@ import { GITBOOK_ASSETS_URL, GITBOOK_URL } from '@v2/lib/env'; +import { joinPathWithBaseURL } from './paths'; /** * Create a public URL for an asset. */ export function getAssetURL(path: string): string { - return `${GITBOOK_ASSETS_URL || GITBOOK_URL}/~gitbook/static/${path}`; + return joinPathWithBaseURL(GITBOOK_ASSETS_URL || GITBOOK_URL, `~gitbook/static/${path}`); } From 957d1e30e62bc963cf07c987756a4286b9c5a716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Wed, 9 Apr 2025 19:50:12 +0200 Subject: [PATCH 2/5] Fix condition --- .github/workflows/deploy-preview.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-preview.yaml b/.github/workflows/deploy-preview.yaml index 8166a9c218..91b76a1e23 100644 --- a/.github/workflows/deploy-preview.yaml +++ b/.github/workflows/deploy-preview.yaml @@ -200,7 +200,7 @@ jobs: name: Visual Testing v2 (Cloudflare) needs: deploy-v2-cloudflare timeout-minutes: 10 - if: startsWith(github.ref_name, 'cloudflare/') + if: startsWith(github.ref_name, 'refs/heads/cloudflare/') steps: - name: Checkout uses: actions/checkout@v4 @@ -263,7 +263,7 @@ jobs: name: Visual Testing Customers v2 (Cloudflare) needs: deploy-v2-cloudflare timeout-minutes: 8 - if: startsWith(github.ref_name, 'cloudflare/') + if: startsWith(github.ref_name, 'refs/heads/cloudflare/') steps: - name: Checkout uses: actions/checkout@v4 From 7b00d34342ae08142b6818a8aa8cb8dc14c69e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Wed, 9 Apr 2025 20:34:23 +0200 Subject: [PATCH 3/5] Fix condition --- .github/workflows/deploy-preview.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-preview.yaml b/.github/workflows/deploy-preview.yaml index 91b76a1e23..db000bf15c 100644 --- a/.github/workflows/deploy-preview.yaml +++ b/.github/workflows/deploy-preview.yaml @@ -200,7 +200,7 @@ jobs: name: Visual Testing v2 (Cloudflare) needs: deploy-v2-cloudflare timeout-minutes: 10 - if: startsWith(github.ref_name, 'refs/heads/cloudflare/') + if: startsWith(github.head_ref || github.ref_name, 'refs/heads/cloudflare/') steps: - name: Checkout uses: actions/checkout@v4 @@ -263,7 +263,7 @@ jobs: name: Visual Testing Customers v2 (Cloudflare) needs: deploy-v2-cloudflare timeout-minutes: 8 - if: startsWith(github.ref_name, 'refs/heads/cloudflare/') + if: startsWith(github.head_ref || github.ref_name, 'refs/heads/cloudflare/') steps: - name: Checkout uses: actions/checkout@v4 From aaf901c9e1f8563907256eb055ec46957d87c3a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Wed, 9 Apr 2025 23:03:51 +0200 Subject: [PATCH 4/5] Again --- .github/workflows/deploy-preview.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-preview.yaml b/.github/workflows/deploy-preview.yaml index db000bf15c..1b26e1679b 100644 --- a/.github/workflows/deploy-preview.yaml +++ b/.github/workflows/deploy-preview.yaml @@ -200,7 +200,7 @@ jobs: name: Visual Testing v2 (Cloudflare) needs: deploy-v2-cloudflare timeout-minutes: 10 - if: startsWith(github.head_ref || github.ref_name, 'refs/heads/cloudflare/') + if: startsWith(github.head_ref || github.ref_name, 'cloudflare/') steps: - name: Checkout uses: actions/checkout@v4 @@ -263,7 +263,7 @@ jobs: name: Visual Testing Customers v2 (Cloudflare) needs: deploy-v2-cloudflare timeout-minutes: 8 - if: startsWith(github.head_ref || github.ref_name, 'refs/heads/cloudflare/') + if: startsWith(github.head_ref || github.ref_name, 'cloudflare/') steps: - name: Checkout uses: actions/checkout@v4 From 730771beb33dcc26a5123b02f1defee90f42fb80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Wed, 9 Apr 2025 23:24:28 +0200 Subject: [PATCH 5/5] Try longer --- .github/workflows/deploy-preview.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yaml b/.github/workflows/deploy-preview.yaml index 1b26e1679b..a1b6b3a5e0 100644 --- a/.github/workflows/deploy-preview.yaml +++ b/.github/workflows/deploy-preview.yaml @@ -199,7 +199,7 @@ jobs: runs-on: ubuntu-latest name: Visual Testing v2 (Cloudflare) needs: deploy-v2-cloudflare - timeout-minutes: 10 + timeout-minutes: 15 if: startsWith(github.head_ref || github.ref_name, 'cloudflare/') steps: - name: Checkout