diff --git a/.github/workflows/deploy-preview.yaml b/.github/workflows/deploy-preview.yaml index 8166a9c21..a1b6b3a5e 100644 --- a/.github/workflows/deploy-preview.yaml +++ b/.github/workflows/deploy-preview.yaml @@ -199,8 +199,8 @@ jobs: runs-on: ubuntu-latest name: Visual Testing v2 (Cloudflare) needs: deploy-v2-cloudflare - timeout-minutes: 10 - if: startsWith(github.ref_name, 'cloudflare/') + timeout-minutes: 15 + 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.ref_name, 'cloudflare/') + if: startsWith(github.head_ref || github.ref_name, 'cloudflare/') steps: - name: Checkout uses: actions/checkout@v4 diff --git a/packages/gitbook/src/lib/assets.ts b/packages/gitbook/src/lib/assets.ts index 0b53e31e7..622d7ac95 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}`); }