Skip to content

Commit 30e9e18

Browse files
authored
Merge branch 'main' into stevenh/fix-empty-href
2 parents fcae8b0 + a1da4f0 commit 30e9e18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1245
-129
lines changed

.changeset/cool-jars-matter.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"gitbook": patch
3+
---
4+
5+
fix href being empty in TOC

.changeset/cool-seas-approve.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"gitbook": patch
3+
---
4+
5+
Fix navigation between sections/variants when previewing a site in v2

.changeset/fast-trees-battle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@gitbook/react-openapi': patch
3+
---
4+
5+
Add authorization header for OAuth2

.changeset/gorgeous-cycles-cheat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"gitbook-v2": patch
3+
---
4+
5+
add a force-revalidate api route to force bust the cache in case of errors

.changeset/rotten-seals-rush.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@gitbook/react-openapi': patch
3+
---
4+
5+
Indent JSON python code sample

.changeset/stupid-plums-perform.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"gitbook": patch
3+
"gitbook-v2": patch
4+
---
5+
6+
cache fonts and static image used in OGImage in memory

.changeset/thick-chefs-repeat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@gitbook/react-openapi': patch
3+
---
4+
5+
Handle nested deprecated properties in generateSchemaExample

.changeset/violet-schools-care.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@gitbook/react-openapi': patch
3+
---
4+
5+
Deduplicate path parameters from OpenAPI spec

.changeset/wise-gifts-smash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"gitbook-v2": patch
3+
---
4+
5+
remove trailing slash from linker
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Gradual Deploy to Cloudflare
2+
description: Use gradual deployment to deploy to Cloudflare. This action will upload the middleware and server versions to Cloudflare and kept them bound together
3+
inputs:
4+
apiToken:
5+
description: 'Cloudflare API token'
6+
required: true
7+
accountId:
8+
description: 'Cloudflare account ID'
9+
required: true
10+
environment:
11+
description: 'Cloudflare environment to deploy to (staging, production, preview)'
12+
required: true
13+
middlewareVersionId:
14+
description: 'Middleware version ID to deploy'
15+
required: true
16+
serverVersionId:
17+
description: 'Server version ID to deploy'
18+
required: true
19+
outputs:
20+
deployment-url:
21+
description: "Deployment URL"
22+
value: ${{ steps.deploy_middleware.outputs.deployment-url }}
23+
runs:
24+
using: 'composite'
25+
steps:
26+
- id: wrangler_status
27+
name: Check wrangler deployment status
28+
uses: cloudflare/[email protected]
29+
with:
30+
apiToken: ${{ inputs.apiToken }}
31+
accountId: ${{ inputs.accountId }}
32+
workingDirectory: ./
33+
wranglerVersion: '4.10.0'
34+
environment: ${{ inputs.environment }}
35+
command: deployments status --config ./packages/gitbook-v2/openNext/customWorkers/defaultWrangler.jsonc
36+
37+
# This step is used to get the version ID that is currently deployed to Cloudflare.
38+
- id: extract_current_version
39+
name: Extract current version
40+
shell: bash
41+
run: |
42+
version_id=$(echo "${{ steps.wrangler_status.outputs.command-output }}" | grep -A 3 "(100%)" | grep -oP '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')
43+
echo "version_id=$version_id" >> $GITHUB_OUTPUT
44+
45+
- id: deploy_server
46+
name: Deploy server to Cloudflare at 0%
47+
uses: cloudflare/[email protected]
48+
with:
49+
apiToken: ${{ inputs.apiToken }}
50+
accountId: ${{ inputs.accountId }}
51+
workingDirectory: ./
52+
wranglerVersion: '4.10.0'
53+
environment: ${{ inputs.environment }}
54+
command: versions deploy ${{ steps.extract_current_version.outputs.version_id }}@100% ${{ inputs.serverVersionId }}@0% -y --config ./packages/gitbook-v2/openNext/customWorkers/defaultWrangler.jsonc
55+
56+
# Since we use version overrides headers, we can directly deploy the middleware to 100%.
57+
- id: deploy_middleware
58+
name: Deploy middleware to Cloudflare at 100%
59+
uses: cloudflare/[email protected]
60+
with:
61+
apiToken: ${{ inputs.apiToken }}
62+
accountId: ${{ inputs.accountId }}
63+
workingDirectory: ./
64+
wranglerVersion: '4.10.0'
65+
environment: ${{ inputs.environment }}
66+
command: versions deploy ${{ inputs.middlewareVersionId }}@100% -y --config ./packages/gitbook-v2/openNext/customWorkers/middlewareWrangler.jsonc
67+
68+
- name: Deploy server to Cloudflare at 100%
69+
uses: cloudflare/[email protected]
70+
with:
71+
apiToken: ${{ inputs.apiToken }}
72+
accountId: ${{ inputs.accountId }}
73+
workingDirectory: ./
74+
wranglerVersion: '4.10.0'
75+
environment: ${{ inputs.environment }}
76+
command: versions deploy ${{ inputs.serverVersionId }}@100% -y --config ./packages/gitbook-v2/openNext/customWorkers/defaultWrangler.jsonc
77+
78+
- name: Outputs
79+
shell: bash
80+
env:
81+
DEPLOYMENT_URL: ${{ steps.deploy_middleware.outputs.deployment-url }}
82+
run: |
83+
echo "URL: ${{ steps.deploy_middleware.outputs.deployment-url }}"

0 commit comments

Comments
 (0)