Skip to content

Commit 4f1875d

Browse files
committed
fix docs preview on main
1 parent 7f04332 commit 4f1875d

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.github/set_docs_main_preview_url.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
version_id = m.group(1)
2222
preview_url = f'https://{version_id}-{worker_name}.workers.dev'
23+
print('CloudFlare worker preview URL:', preview_url)
2324

2425
gh_headers = {
2526
'Accept': 'application/vnd.github+json',
@@ -41,7 +42,7 @@
4142
})
4243
}
4344
r = httpx.post(deployment_url, headers=gh_headers, json=deployment_data)
44-
print(f'POST {deployment_url}: {r.status_code}') # {r.text}
45+
print(f'POST {deployment_url} {r.status_code} {r.text}')
4546
r.raise_for_status()
4647
deployment_id = r.json()['id']
4748

@@ -52,5 +53,5 @@
5253
'state': 'success',
5354
}
5455
r = httpx.post(status_url, headers=gh_headers, json=status_data)
55-
print(f'POST {status_url}: {r.status_code}') # {r.text}
56+
print(f'POST {status_url} {r.status_code} {r.text}')
5657
r.raise_for_status()

.github/workflows/after-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
GITHUB_EVENT_JSON: ${{ toJSON(github.event) }}
9393

9494
- name: Set preview URL
95-
run: uv run --with httpx .github/set_docs_pr_preview_url.py
95+
run: uv run --no-project --with httpx .github/set_docs_pr_preview_url.py
9696
env:
9797
DEPLOY_OUTPUT: ${{ steps.deploy.outputs.command-output }}
9898
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,12 @@ jobs:
346346
--var GIT_BRANCH:main
347347
348348
- name: Set preview URL
349-
run: uv run --with httpx .github/set_docs_main_preview_url.py
349+
run: uv run --no-project --with httpx .github/set_docs_main_preview_url.py
350350
env:
351351
DEPLOY_OUTPUT: ${{ steps.deploy.outputs.command-output }}
352352
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
353353
REPOSITORY: ${{ github.repository }}
354-
REF: ${{ github.event.workflow_run.head_sha }}
354+
REF: ${{ github.sha }}
355355

356356
# TODO(Marcelo): We need to split this into two jobs: `build` and `release`.
357357
release:

0 commit comments

Comments
 (0)