Skip to content

Commit 2c45b11

Browse files
authored
fix(build): support datahub-wheels from forked PRs (#12730)
1 parent 8fefa3f commit 2c45b11

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/python-build-pages.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
# Note: not using acryldata/sane-checkout-action because this is a
4343
# pull_request_target event, and hence requires `ref`.
4444
with:
45-
ref: ${{ github.event.pull_request.base.sha }}
45+
ref: ${{ github.event.pull_request.head.sha }}
4646
- uses: actions/setup-python@v5
4747
with:
4848
python-version: "3.10"
@@ -58,11 +58,17 @@ jobs:
5858
env:
5959
GITHUB_TOKEN: ${{ github.token }}
6060
- name: Publish
61-
uses: cloudflare/pages-action@v1
61+
# Cloudflare's pages-action does not support PRs from forks.
62+
# See https://developers.cloudflare.com/pages/platform/known-issues/
63+
# Based on the discussion here https://github.com/json-schema-org/website/issues/330
64+
# we can use a direct upload to work around this limitation.
65+
# See https://github.com/AdrianGonz97/refined-cf-pages-action#enabling-pr-previews-from-forks
66+
uses: AdrianGonz97/refined-cf-pages-action@v1
6267
with:
6368
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
6469
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
6570
projectName: ${{ vars.CLOUDFLARE_WHEELS_PROJECT_NAME }}
71+
deploymentName: ${{ vars.CLOUDFLARE_WHEELS_PROJECT_NAME }}
6672
workingDirectory: python-build
6773
directory: site
6874
gitHubToken: ${{ github.token }}

0 commit comments

Comments
 (0)