Skip to content

Commit 7cecbc0

Browse files
authored
Merge branch 'main' into comment-on-pr
2 parents 04ad30b + ea8efbf commit 7cecbc0

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/pr-preview-cleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ permissions:
88
contents: read
99

1010
env:
11-
CLOUDFLARE_PAGES_PROJECT_NAME: typelevel-website
11+
CLOUDFLARE_PAGES_PROJECT_NAME: typelevel-website-test
1212
BRANCH_NAME: pr-${{ github.event.pull_request.number }}
1313

1414
jobs:

.github/workflows/pr-preview-deploy.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ on:
88
permissions:
99
actions: read
1010
contents: read
11+
deployments: write
1112
# Write sticky comment
1213
pull-requests: write
1314

1415
env:
15-
CLOUDFLARE_PAGES_PROJECT_NAME: typelevel-website
16+
CLOUDFLARE_PAGES_PROJECT_NAME: typelevel-website-test
1617

1718
jobs:
1819
deploy:
@@ -43,6 +44,12 @@ jobs:
4344
echo "branch=pr-$(cat pr_number.txt)" >> "$GITHUB_OUTPUT"
4445
4546
- name: Deploy
47+
env:
48+
# this action links the GitHub deployment to a PR using
49+
# GITHUB_HEAD_REF, which isn't set on workflow_run events.
50+
# We set it manually to the PR's head branch so the deployment
51+
# shows up on the pull request.
52+
GITHUB_HEAD_REF: ${{ github.event.workflow_run.head_branch }}
4653
uses: cloudflare/wrangler-action@v4
4754
id: deploy
4855
with:

0 commit comments

Comments
 (0)